Skip to content

Commit

Permalink
RF: move EXT_LIBS to install names tests
Browse files Browse the repository at this point in the history
  • Loading branch information
matthew-brett committed May 1, 2014
1 parent c13de8f commit d5365b4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 16 deletions.
5 changes: 1 addition & 4 deletions delocate/tests/test_delocating.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,7 @@
assert_equal, assert_not_equal)

from .test_install_names import (DATA_PATH, LIBA, LIBB, LIBC, TEST_LIB,
_copy_libs)

# External libs linked from test data
EXT_LIBS = ('/usr/lib/libstdc++.6.dylib', '/usr/lib/libSystem.B.dylib')
_copy_libs, EXT_LIBS)

def _make_libtree(out_path):
liba, libb, libc, test_lib = _copy_libs(
Expand Down
18 changes: 6 additions & 12 deletions delocate/tests/test_install_names.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
from nose.tools import (assert_true, assert_false, assert_raises,
assert_equal, assert_not_equal)

# External libs linked from test data
EXT_LIBS = ('/usr/lib/libstdc++.6.dylib', '/usr/lib/libSystem.B.dylib')

DATA_PATH = pjoin(dirname(__file__), 'data')
LIBA = pjoin(DATA_PATH, 'liba.dylib')
Expand All @@ -27,21 +29,13 @@
def test_get_install_names():
# Test install name listing
assert_equal(set(get_install_names(LIBA)),
set(('/usr/lib/libstdc++.6.dylib',
'/usr/lib/libSystem.B.dylib')))
set(EXT_LIBS))
assert_equal(set(get_install_names(LIBB)),
set(('liba.dylib',
'/usr/lib/libstdc++.6.dylib',
'/usr/lib/libSystem.B.dylib')))
set(('liba.dylib',) + EXT_LIBS))
assert_equal(set(get_install_names(LIBC)),
set(('liba.dylib',
'libb.dylib',
'/usr/lib/libstdc++.6.dylib',
'/usr/lib/libSystem.B.dylib')))
set(('liba.dylib', 'libb.dylib') + EXT_LIBS))
assert_equal(set(get_install_names(TEST_LIB)),
set(('libc.dylib',
'/usr/lib/libstdc++.6.dylib',
'/usr/lib/libSystem.B.dylib')))
set(('libc.dylib',) + EXT_LIBS))
# Non-object file returns empty tuple
assert_equal(get_install_names(__file__), ())
# Static archive and object files returns empty tuple
Expand Down

0 comments on commit d5365b4

Please sign in to comment.