Author: bugman Date: Mon Mar 26 07:25:28 2007 New Revision: 3240 URL: http://svn.gna.org/viewcvs/relax?rev=3240&view=rev Log: Bug fix. This issue was reported by Gary Thompson at https://mail.gna.org/public/relax-devel/2007-03/msg00084.html (Message-id: <45FE68E4.4010000@xxxxxxxxxxxxxxx>). The module separator character '.' had been replace by os.curdir in a number of places in the unit test runner. This has now been fixed. Modified: 1.3/test_suite/unit_tests/unit_test_runner.py Modified: 1.3/test_suite/unit_tests/unit_test_runner.py URL: http://svn.gna.org/viewcvs/relax/1.3/test_suite/unit_tests/unit_test_runner.py?rev=3240&r1=3239&r2=3240&view=diff ============================================================================== --- 1.3/test_suite/unit_tests/unit_test_runner.py (original) +++ 1.3/test_suite/unit_tests/unit_test_runner.py Mon Mar 26 07:25:28 2007 @@ -115,7 +115,7 @@ if module != None: result = [module] - components = module_path.split(os.curdir) + components = module_path.split('.') for component in components[1:]: module = getattr(module, component) result.append(module) @@ -162,10 +162,10 @@ break if relative_path != None: - relative_path = os.curdir.join(relative_path) + relative_path = '.'.join(relative_path) if relative_path != '': - relative_path = os.curdir.join((relative_path, module_name)) + relative_path = '.'.join((relative_path, module_name)) else: relative_path = module_name @@ -347,10 +347,10 @@ path = [''] - for elem in module_path.split(os.curdir): - old_path_key = os.curdir.join(path) + for elem in module_path.split('.'): + old_path_key = '.'.join(path) path.append(elem) - path_key = os.curdir.join(path) + path_key = '.'.join(path) if path_key not in suite_dictionary: test_suite = unittest.TestSuite() suite_dictionary[path_key]=test_suite @@ -375,11 +375,6 @@ TEST_SUITE_ROOT='test-suite-root_constant' ''' @type TEST_SUITE_ROOT: string @ivar TEST_SUITE_ROOT: constant indicating the use of the current unit test suite found from the root_path''' - - # Unused. - #CURRENT_DIRECTORY='.' - #''' @type CURRENT_DIRECTORY: string - # @ivar CURRENT_DIRECTORY: internal constant defining a name for the current directory on all platforms''' system_path_pattern = ['test_suite' + os.sep + 'unit_tests', os.pardir + os.sep + os.pardir] ''' @type system_path_pattern: list of strings @@ -630,7 +625,7 @@ result.add(tuple(mpath)) - module_path_elems = test_module.split(os.curdir) + module_path_elems = test_module.split('.') module_norm_path = []