diff options
author | Michael Foord <michael@voidspace.org.uk> | 2013-02-11 13:29:58 (GMT) |
---|---|---|
committer | Michael Foord <michael@voidspace.org.uk> | 2013-02-11 13:29:58 (GMT) |
commit | b71b8ec7b1d3ae8eb4f446387f766aea7d7d831b (patch) | |
tree | 51408c0663aa285ca7510a51a78edf0dfef152e0 /Lib/unittest | |
parent | a23a39c07d3027e5139cc6127783cab23ca1a511 (diff) | |
parent | f78f5b11f65ff6fd582d937615e8a1c3c8373662 (diff) | |
download | cpython-b71b8ec7b1d3ae8eb4f446387f766aea7d7d831b.zip cpython-b71b8ec7b1d3ae8eb4f446387f766aea7d7d831b.tar.gz cpython-b71b8ec7b1d3ae8eb4f446387f766aea7d7d831b.tar.bz2 |
Merge
Diffstat (limited to 'Lib/unittest')
-rw-r--r-- | Lib/unittest/main.py | 2 | ||||
-rw-r--r-- | Lib/unittest/test/test_discovery.py | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/Lib/unittest/main.py b/Lib/unittest/main.py index 061916c..ead6493 100644 --- a/Lib/unittest/main.py +++ b/Lib/unittest/main.py @@ -222,7 +222,7 @@ class TestProgram(object): def _do_discovery(self, argv, Loader=None): if Loader is None: - Loader = self.testLoader + Loader = lambda: self.testLoader # handle command line args for test discovery self.progName = '%s discover' % self.progName diff --git a/Lib/unittest/test/test_discovery.py b/Lib/unittest/test/test_discovery.py index eba269f..1fdf991 100644 --- a/Lib/unittest/test/test_discovery.py +++ b/Lib/unittest/test/test_discovery.py @@ -269,7 +269,7 @@ class TestDiscovery(unittest.TestCase): self.args.append((start_dir, pattern, top_level_dir)) return 'tests' - program.testLoader = Loader + program.testLoader = Loader() program._do_discovery(['-v']) self.assertEqual(Loader.args, [('.', 'test*.py', None)]) |