diff options
author | Michael Foord <fuzzyman@voidspace.org.uk> | 2009-09-13 19:07:03 +0000 |
---|---|---|
committer | Michael Foord <fuzzyman@voidspace.org.uk> | 2009-09-13 19:07:03 +0000 |
commit | e91ea56b307e026ba40140305d8f35f0e1c1143a (patch) | |
tree | 9fc09481fe1ff2b21bdfd56b25860a4e25a7cbd1 /Lib/unittest/suite.py | |
parent | 6848d82a7c90ccf28ba0991129f99675e7b78e24 (diff) | |
download | cpython-git-e91ea56b307e026ba40140305d8f35f0e1c1143a.tar.gz |
Test discovery in unittest will only attempt to import modules that are importable; i.e. their names are valid Python identifiers. If an import fails during discovery this will be recorded as an error and test discovery will continue. Issue 6568.
Diffstat (limited to 'Lib/unittest/suite.py')
-rw-r--r-- | Lib/unittest/suite.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/unittest/suite.py b/Lib/unittest/suite.py index 5fba259d82..730b4d9747 100644 --- a/Lib/unittest/suite.py +++ b/Lib/unittest/suite.py @@ -1,6 +1,7 @@ """TestSuite""" from . import case +from . import util class TestSuite(object): @@ -17,7 +18,7 @@ class TestSuite(object): self.addTests(tests) def __repr__(self): - return "<%s tests=%s>" % (_strclass(self.__class__), list(self)) + return "<%s tests=%s>" % (util.strclass(self.__class__), list(self)) def __eq__(self, other): if not isinstance(other, self.__class__): |