diff options
Diffstat (limited to 'unit_tests/test_bug105.py')
-rw-r--r-- | unit_tests/test_bug105.py | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/unit_tests/test_bug105.py b/unit_tests/test_bug105.py new file mode 100644 index 0000000..e0362a8 --- /dev/null +++ b/unit_tests/test_bug105.py @@ -0,0 +1,32 @@ +import os +import unittest + +class TestBug105(unittest.TestCase): + + def test_load_in_def_order(self): + from nose.loader import TestLoader + + where = os.path.abspath(os.path.join(os.path.dirname(__file__), + 'support', 'bug105')) + + l = TestLoader() + testmod = l.loadTestsFromDir(where).next() + print testmod + testmod.setUp() + + def fix(t): + s = str(t) + if ': ' in s: + return s[s.index(': ')+2:] + return s + + tests = map(fix, testmod) + print tests + self.assertEqual(tests, ['tests.test_z', 'tests.test_a', + 'tests.test_dz', 'tests.test_mdz', + 'tests.test_b']) + + +if __name__ == '__main__': + unittest.main() + |