parent
dc14547839
commit
e2daecb7e0
@ -0,0 +1,50 @@
|
|||||||
|
diff --git a/nose/config.py b/nose/config.py
|
||||||
|
index ad01e61..d9aec2d 100644
|
||||||
|
--- a/nose/config.py
|
||||||
|
+++ b/nose/config.py
|
||||||
|
@@ -78,7 +78,7 @@ class ConfiguredDefaultsOptionParser(object):
|
||||||
|
except AttributeError:
|
||||||
|
filename = '<???>'
|
||||||
|
try:
|
||||||
|
- cfg.readfp(fh)
|
||||||
|
+ cfg.read_file(fh)
|
||||||
|
except ConfigParser.Error, exc:
|
||||||
|
raise ConfigError("Error reading config file %r: %s" %
|
||||||
|
(filename, str(exc)))
|
||||||
|
diff --git a/nose/result.py b/nose/result.py
|
||||||
|
index f974a14..228a42c 100644
|
||||||
|
--- a/nose/result.py
|
||||||
|
+++ b/nose/result.py
|
||||||
|
@@ -13,7 +13,7 @@ try:
|
||||||
|
# 2.7+
|
||||||
|
from unittest.runner import _TextTestResult
|
||||||
|
except ImportError:
|
||||||
|
- from unittest import _TextTestResult
|
||||||
|
+ from unittest import TextTestResult as _TextTestResult
|
||||||
|
from nose.config import Config
|
||||||
|
from nose.util import isclass, ln as _ln # backwards compat
|
||||||
|
|
||||||
|
diff --git a/unit_tests/test_xunit.py b/unit_tests/test_xunit.py
|
||||||
|
index 2a9f69b..560b9c2 100644
|
||||||
|
--- a/unit_tests/test_xunit.py
|
||||||
|
+++ b/unit_tests/test_xunit.py
|
||||||
|
@@ -134,7 +134,8 @@ class TestXMLOutputWithXML(unittest.TestCase):
|
||||||
|
err_lines = err.text.strip().split("\n")
|
||||||
|
eq_(err_lines[0], 'Traceback (most recent call last):')
|
||||||
|
eq_(err_lines[-1], 'AssertionError: one is not \'equal\' to two')
|
||||||
|
- eq_(err_lines[-2], ' raise AssertionError("one is not \'equal\' to two")')
|
||||||
|
+ r_line = -3 if '^' * 10 in err_lines[-2] else -2
|
||||||
|
+ eq_(err_lines[r_line], ' raise AssertionError("one is not \'equal\' to two")')
|
||||||
|
else:
|
||||||
|
# this is a dumb test for 2.4-
|
||||||
|
assert '<?xml version="1.0" encoding="UTF-8"?>' in result
|
||||||
|
@@ -201,7 +202,8 @@ class TestXMLOutputWithXML(unittest.TestCase):
|
||||||
|
err_lines = err.text.strip().split("\n")
|
||||||
|
eq_(err_lines[0], 'Traceback (most recent call last):')
|
||||||
|
eq_(err_lines[-1], 'RuntimeError: some error happened')
|
||||||
|
- eq_(err_lines[-2], ' raise RuntimeError("some error happened")')
|
||||||
|
+ r_line = -3 if '^' * 10 in err_lines[-2] else -2
|
||||||
|
+ eq_(err_lines[r_line], ' raise RuntimeError("some error happened")')
|
||||||
|
else:
|
||||||
|
# this is a dumb test for 2.4-
|
||||||
|
assert '<?xml version="1.0" encoding="UTF-8"?>' in result
|
Loading…
Reference in new issue