Test failure under Python 2.7
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
zope.testing |
Invalid
|
Undecided
|
Unassigned |
Bug Description
Running zope.testing's own tests under Python 2.7 fails, because the unittest module
has been significanly refactored:
$ svn co svn+ssh:
...
$ cd zope.testing
$ /opt/Python-
...
$ bin/buildout
...
$ bin/test --all
Running zope.testing.
Set up zope.testing.
Failure in test /tmp/zt/
Failed doctest test for testrunner-
File "/tmp/zt/
------
File "/tmp/zt/
Failed example:
try: testrunner.
finally: sys.stdin = real_stdin
# doctest: +NORMALIZE_
Differences (ndiff with -expected +actual):
Running zope.testing.
- ...
+ Set up zope.testing.
+ <BLANKLINE>
+ <BLANKLINE>
Error in test test_post_
Traceback (most recent call last):
+ testrunner-
- testrunner-
- Line NNN, in test_post_
<BLANKLINE>
1 != 2
- unittest.
- -> ...
+ > /opt/Python-
+ -> raise self.failureExc
(Pdb) up
- > testrunner-
- -> self.assertEqual(x, y)
+ > /opt/Python-
+ -> assertion_
(Pdb) p x
- 1
+ *** NameError: NameError("name 'x' is not defined",)
(Pdb) p y
- 2
+ *** NameError: NameError("name 'y' is not defined",)
(Pdb) c
True
Ran 261 tests with 1 failures and 0 errors in 22.154 seconds.
Tearing down left over layers:
Tear down zope.testing.
Changed in zope.testing: | |
status: | New → Fix Committed |
I made an unsuccessful stab at fixing this issue by replacing the
stdlib 'assertEqual' method with one defined locally on the testcase.
Maybe somebody else can use the attached patch as a starting point.