From 7079b546e06dd77b61cd1ba4692a077a85b9e033 Mon Sep 17 00:00:00 2001 From: Johan Dahlin Date: Sat, 26 Jul 2008 08:46:07 +0000 Subject: Run pyflakes on the testsuite, remove unused imports and reorganize 2008-07-26 Johan Dahlin * tests/common.py: * tests/test_conversion.py: * tests/test_enum.py: * tests/test_interface.py: * tests/test_option.py: * tests/test_source.py: * tests/test_subprocess.py: * tests/test_subtype.py: * tests/test_thread.py: * tests/test_unknown.py: Run pyflakes on the testsuite, remove unused imports and reorganize others. svn path=/trunk/; revision=859 --- tests/common.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'tests/common.py') diff --git a/tests/common.py b/tests/common.py index fe7940f..d41b9f2 100644 --- a/tests/common.py +++ b/tests/common.py @@ -42,11 +42,7 @@ def importModule(module, directory, name=None): except ImportError, e: raise SystemExit('%s could not be imported: %s' % (origName, e)) - if hasattr(obj, '__file__'): - location = obj.__file__ - else: - package = __import__(fromlist) - location = os.path.join(package.__file__, name) + location = obj.__file__ current = os.getcwd() expected = os.path.abspath(os.path.join(current, location)) -- cgit