Tests don't run under Python 2.7 (unittest._WritelnDecorator has moved)
Bug #582113 reported by
Andrew Bennetts
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Bazaar |
Fix Released
|
High
|
Martin Packman |
Bug Description
bzrlib/
The hackish fix is to try importing _WritelnDecorator from unittest.runner (where it can be found in 2.7). A better fix would be to stop relying on non-public attributes, perhaps by convincing Python to expose this useful class somewhere public? Or perhaps put this functionality into testtools?
Related branches
lp:~gz/bzr/python_2.7_selftest_582113
- John A Meinel: Approve
-
Diff: 228 lines (+40/-29)3 files modifiedbzrlib/tests/TestUtil.py (+7/-1)
bzrlib/tests/__init__.py (+26/-24)
bzrlib/tests/test_selftest.py (+7/-4)
Also, we use unittest. _TextTestResult , which is still provided but deprecated in 2.7. The preferred name in 2.7 is unittest. TextTestResult.