diff options
author | Arfrever Frehtes Taifersar Arahesis <arfrever@gentoo.org> | 2009-11-21 18:23:52 +0000 |
---|---|---|
committer | Arfrever Frehtes Taifersar Arahesis <arfrever@gentoo.org> | 2009-11-21 18:23:52 +0000 |
commit | c481d6bc98609bad142138d8547e7e4950c15579 (patch) | |
tree | b860acb5f41f36413fd37923acca99372e15f4e5 /dev-python/lxml/files | |
parent | ppc stable #292956 (diff) | |
download | gentoo-2-c481d6bc98609bad142138d8547e7e4950c15579.tar.gz gentoo-2-c481d6bc98609bad142138d8547e7e4950c15579.tar.bz2 gentoo-2-c481d6bc98609bad142138d8547e7e4950c15579.zip |
Fix tests with Python 2.7 (bug #293892).
(Portage version: 14872-svn/cvs/Linux x86_64)
Diffstat (limited to 'dev-python/lxml/files')
-rw-r--r-- | dev-python/lxml/files/lxml-2.2.4-python-2.7.patch | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/dev-python/lxml/files/lxml-2.2.4-python-2.7.patch b/dev-python/lxml/files/lxml-2.2.4-python-2.7.patch new file mode 100644 index 000000000000..540e8b6dd571 --- /dev/null +++ b/dev-python/lxml/files/lxml-2.2.4-python-2.7.patch @@ -0,0 +1,31 @@ +--- test.py ++++ test.py +@@ -75,6 +75,11 @@ + set + except NameError: + from sets import Set as set ++try: ++ # Python >=2.7 and >=3.2 ++ from unittest.runner import _TextTestResult ++except ImportError: ++ from unittest import _TextTestResult + + __metaclass__ = type + +@@ -302,14 +307,14 @@ + return results + + +-class CustomTestResult(unittest._TextTestResult): ++class CustomTestResult(_TextTestResult): + """Customised TestResult. + + It can show a progress bar, and displays tracebacks for errors and failures + as soon as they happen, in addition to listing them all at the end. + """ + +- __super = unittest._TextTestResult ++ __super = _TextTestResult + __super_init = __super.__init__ + __super_startTest = __super.startTest + __super_stopTest = __super.stopTest |