From d5365b4a6e3105a76f15b914ccf013b2784d58e9 Mon Sep 17 00:00:00 2001 From: Matthew Brett Date: Wed, 30 Apr 2014 23:28:33 -0700 Subject: [PATCH] RF: move EXT_LIBS to install names tests --- delocate/tests/test_delocating.py | 5 +---- delocate/tests/test_install_names.py | 18 ++++++------------ 2 files changed, 7 insertions(+), 16 deletions(-) diff --git a/delocate/tests/test_delocating.py b/delocate/tests/test_delocating.py index e435f0e8..3bb96af9 100644 --- a/delocate/tests/test_delocating.py +++ b/delocate/tests/test_delocating.py @@ -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( diff --git a/delocate/tests/test_install_names.py b/delocate/tests/test_install_names.py index f2bcedb3..920931af 100644 --- a/delocate/tests/test_install_names.py +++ b/delocate/tests/test_install_names.py @@ -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') @@ -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