diff --git a/NEWS b/NEWS index 36c73eb..546af7f 100644 --- a/NEWS +++ b/NEWS @@ -7,6 +7,16 @@ Changes and improvements to testtools_, grouped by release. NEXT ~~~~ +1.6.1 +~~~~~ + +Changes +------- + +* Fix installing when ``extras`` is not already installed. Our guards + for the absence of unittest2 were not sufficient. + (Robert Collins, #1430076) + 1.6.0 ~~~~~ diff --git a/testtools/__init__.py b/testtools/__init__.py index cd31539..55bff9d 100644 --- a/testtools/__init__.py +++ b/testtools/__init__.py @@ -122,4 +122,4 @@ else: # If the releaselevel is 'final', then the tarball will be major.minor.micro. # Otherwise it is major.minor.micro~$(revno). -__version__ = (1, 7, 0, 'dev', 0) +__version__ = (1, 6, 1, 'final', 0) diff --git a/testtools/run.py b/testtools/run.py index 9c51406..3e19a2d 100755 --- a/testtools/run.py +++ b/testtools/run.py @@ -25,7 +25,10 @@ from testtools.testsuite import filter_by_ids, iterate_tests, sorted_tests defaultTestLoader = unittest.defaultTestLoader defaultTestLoaderCls = unittest.TestLoader have_discover = True -discover_impl = unittest.loader +# This shouldn't really be public - its legacy. Try to set it if we can, and +# if we can't (during installs before unittest2 is installed) just stub it out +# to None. +discover_impl = getattr(unittest, 'loader', None) # Kept for API compatibility, but no longer used. BUFFEROUTPUT = ""