diff options
author | kumar <kumar.mcmillan@gmail.com> | 2011-03-20 12:35:02 -0500 |
---|---|---|
committer | kumar <kumar.mcmillan@gmail.com> | 2011-03-20 12:35:02 -0500 |
commit | b2bc46d2c8e16f59f57ae5ac2f44a4495ba332c8 (patch) | |
tree | 96e21d6794804f3cc78264bf9ebe3534cedae790 | |
parent | 512f8369d69daca633781bf3aa27f7a71d3b7c11 (diff) | |
parent | ba1074e578c9ff3ccdb6dbcaa2e36979ce8d6476 (diff) | |
download | nose-b2bc46d2c8e16f59f57ae5ac2f44a4495ba332c8.tar.gz |
Merged with stable repository
-rw-r--r-- | AUTHORS | 1 | ||||
-rw-r--r-- | CHANGELOG | 4 | ||||
-rw-r--r-- | NEWS | 9 | ||||
-rw-r--r-- | nose/plugins/doctests.py | 10 | ||||
-rw-r--r-- | nose/twistedtools.py | 2 | ||||
-rw-r--r-- | nosetests.1 | 2 | ||||
-rw-r--r-- | setup.cfg.release | 1 | ||||
-rw-r--r-- | unit_tests/test_twisted.py | 2 |
8 files changed, 18 insertions, 13 deletions
@@ -13,3 +13,4 @@ Peter Fein Kevin Mitchell Alex Stewart Timothee Peignier +Thomas Kluyver @@ -7,6 +7,10 @@ - Fixed problems with SkipTest in Python 3.2 (#389) - Fixes Xunit plugin to handle non-UTF8 characters (#395) - Makes --plugins more succinct when there are no options (#235) +- Fixed bug in doctest plugin under python 3. Thanks to Thomas Kluyver + for the patch. (#391) +- Fixed bug in tests for twisted tools. Thanks to Thomas Kluyver + for the patch. 1.0.0 @@ -1,6 +1,5 @@ -0.11.3 ------- +1.0! +---- -nose version 0.11.3 fixes a method resolution order bug in 0.11.2 that -prevented plugin overriding from working correctly with the -DefaultPluginManager. +nose version 1.0 adds support for python 3. The thanks of a grateful +nation go out to Alex Stewart, aka foogod, for all of his great work. diff --git a/nose/plugins/doctests.py b/nose/plugins/doctests.py index b296b7d..f07f641 100644 --- a/nose/plugins/doctests.py +++ b/nose/plugins/doctests.py @@ -63,7 +63,7 @@ try: except ImportError: from StringIO import StringIO import sys -import __builtin__ +import __builtin__ as builtin_mod log = logging.getLogger(__name__) @@ -385,14 +385,14 @@ class DocTestCase(doctest.DocTestCase): def _displayhook(self, value): if value is None: return - setattr(__builtin__, self._result_var, value) + setattr(builtin_mod, self._result_var, value) print repr(value) def tearDown(self): super(DocTestCase, self).tearDown() if self._result_var is not None: sys.displayhook = self._old_displayhook - delattr(__builtin__, self._result_var) + delattr(builtin_mod, self._result_var) class DocFileCase(doctest.DocFileCase): @@ -418,11 +418,11 @@ class DocFileCase(doctest.DocFileCase): def _displayhook(self, value): if value is None: return - setattr(__builtin__, self._result_var, value) + setattr(builtin_mod, self._result_var, value) print repr(value) def tearDown(self): super(DocFileCase, self).tearDown() if self._result_var is not None: sys.displayhook = self._old_displayhook - delattr(__builtin__, self._result_var) + delattr(builtin_mod, self._result_var) diff --git a/nose/twistedtools.py b/nose/twistedtools.py index 5e3d6a4..3720610 100644 --- a/nose/twistedtools.py +++ b/nose/twistedtools.py @@ -97,7 +97,7 @@ def deferred(timeout=None): @deferred(timeout=5.0) def test_resolve(): - return reactor.resolve("nose.python-hosting.com") + return reactor.resolve("www.python.org") Attention! If you combine this decorator with other decorators (like "raises"), deferred() must be called *first*! diff --git a/nosetests.1 b/nosetests.1 index 24d38db..6026181 100644 --- a/nosetests.1 +++ b/nosetests.1 @@ -466,5 +466,5 @@ jpellerin+nose@gmail.com .SH COPYRIGHT LGPL -.\" Generated by docutils manpage writer on 2011-03-20 01:44. +.\" Generated by docutils manpage writer on 2011-02-01 14:01. .\" diff --git a/setup.cfg.release b/setup.cfg.release index e012671..790cd44 100644 --- a/setup.cfg.release +++ b/setup.cfg.release @@ -2,6 +2,7 @@ with-doctest=1 doctest-extension=.rst doctest-fixtures=_fixtures +py3where=build/tests [bdist_rpm] doc_files = man/man1/nosetests.1 README.txt diff --git a/unit_tests/test_twisted.py b/unit_tests/test_twisted.py index 460dacd..be5041d 100644 --- a/unit_tests/test_twisted.py +++ b/unit_tests/test_twisted.py @@ -30,7 +30,7 @@ test_resolve = deferred()(test_resolve) #@deferred() def test_raises_bad_return(): print reactor - reactor.resolve("nose.python-hosting.com") + reactor.resolve("www.python.org") test_raises_bad_return = raises(TypeError)(deferred()(test_raises_bad_return)) # Check we propagate twisted Failures as Exceptions |