summaryrefslogtreecommitdiff
path: root/docutils/test
diff options
context:
space:
mode:
Diffstat (limited to 'docutils/test')
-rw-r--r--docutils/test/DocutilsTestSupport.py21
-rw-r--r--docutils/test/package_unittest.py2
2 files changed, 5 insertions, 18 deletions
diff --git a/docutils/test/DocutilsTestSupport.py b/docutils/test/DocutilsTestSupport.py
index eb9b8fa39..2d40989f5 100644
--- a/docutils/test/DocutilsTestSupport.py
+++ b/docutils/test/DocutilsTestSupport.py
@@ -123,30 +123,17 @@ class StandardTestCase(unittest.TestCase):
operator.
"""
if not first == second:
- raise self.failureException, (
- msg or '%s != %s' % _format_str(first, second))
+ raise self.failureException(
+ msg or '%s != %s' % _format_str(first, second))
def assertNotEqual(self, first, second, msg=None):
"""Fail if the two objects are equal as determined by the '=='
operator.
"""
if first == second:
- raise self.failureException, (
- msg or '%s == %s' % _format_str(first, second))
+ raise self.failureException(
+ msg or '%s == %s' % _format_str(first, second))
- # assertIn and assertNotIn: new in Python 2.7:
- if sys.version_info < (2,7):
-
- def assertIn(self, a, b, msg=None):
- if a not in b:
- raise self.failureException, (
- msg or '%s not in %s' % _format_str(a, b))
-
- def assertNotIn(self, a, b, msg=None):
- if a in b:
- raise self.failureException, (
- msg or '%s in %s' % _format_str(a, b))
-
# aliases for assertion methods, deprecated since Python 2.7
failUnlessEqual = assertEquals = assertEqual
diff --git a/docutils/test/package_unittest.py b/docutils/test/package_unittest.py
index 57b6c945b..9c35723ab 100644
--- a/docutils/test/package_unittest.py
+++ b/docutils/test/package_unittest.py
@@ -120,7 +120,7 @@ def loadTestModules(path, name='', packages=None):
elif isinstance(suite, unittest.TestSuite):
testSuite.addTest(suite)
else:
- raise AssertionError, "don't understand suite (%s)" % mod
+ raise AssertionError("don't understand suite (%s)" % mod)
sys.path.pop(0)
return testSuite