Message387542
diff -r 293d9964cf6e Lib/unittest/loader.py
--- a/Lib/unittest/loader.py Tue Apr 28 00:04:53 2015 -0400
+++ b/Lib/unittest/loader.py Tue Apr 28 10:12:07 2015 +0300
@@ -338,7 +338,7 @@
raise ImportError('Start directory is not importable: %r' % start_dir)
if not is_namespace:
- tests = list(self._find_tests(start_dir, pattern))
+ tests = list(self._find_tests(start_dir, pattern, namespace=True))
return self.suiteClass(tests)
def _get_directory_containing_module(self, module_name):
@@ -403,7 +403,7 @@
name = self._get_name_from_path(full_path)
self._loading_packages.add(name)
try:
- yield from self._find_tests(full_path, pattern, namespace)
+ yield from self._find_tests(full_path, pattern, False)
finally:
self._loading_packages.discard(name)
diff -r 293d9964cf6e Lib/unittest/test/test_program.py
--- a/Lib/unittest/test/test_program.py Tue Apr 28 00:04:53 2015 -0400
+++ b/Lib/unittest/test/test_program.py Tue Apr 28 10:12:07 2015 +0300
@@ -16,7 +16,7 @@
expectedPath = os.path.abspath(os.path.dirname(unittest.test.__file__))
self.wasRun = False
- def _find_tests(start_dir, pattern):
+ def _find_tests(start_dir, pattern, namespace):
self.wasRun = True
self.assertEqual(start_dir, expectedPath)
return tests |
|
Date |
User |
Action |
Args |
2021-02-22 20:14:28 | mdjonyhossainhabib | set | recipients:
+ mdjonyhossainhabib, terry.reedy, rbcollins, ezio.melotti, michael.foord, methane, rgammans, docs@python, Claudiu.Popa, Zbynek.Winkler, eric.snow, pconnell, Florian.Apolloner, ashkop, miss-islington, rgammans@gammascience.co.uk |
2021-02-22 20:14:28 | mdjonyhossainhabib | set | messageid: <1614024868.07.0.998554578611.issue23882@roundup.psfhosted.org> |
2021-02-22 20:14:28 | mdjonyhossainhabib | link | issue23882 messages |
2021-02-22 20:14:27 | mdjonyhossainhabib | create | |
|