summaryrefslogtreecommitdiff
path: root/docutils
diff options
context:
space:
mode:
Diffstat (limited to 'docutils')
-rw-r--r--docutils/test/DocutilsTestSupport.py46
1 files changed, 23 insertions, 23 deletions
diff --git a/docutils/test/DocutilsTestSupport.py b/docutils/test/DocutilsTestSupport.py
index c0c2c331b..0466590fd 100644
--- a/docutils/test/DocutilsTestSupport.py
+++ b/docutils/test/DocutilsTestSupport.py
@@ -93,12 +93,34 @@ class StandardTestCase(unittest.TestCase):
"""
Helper class, providing the same interface as unittest.TestCase,
- but with useful setUp and tearDown methods.
+ but with useful setUp and comparison methods.
"""
def setUp(self):
os.chdir(testroot)
+ def failUnlessEqual(self, first, second, msg=None):
+ """Fail if the two objects are unequal as determined by the '=='
+ operator.
+ """
+ if not first == second:
+ raise self.failureException, \
+ (msg or '%s != %s' % _format_str(first, second))
+
+ def failIfEqual(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))
+
+ # Synonyms for assertion methods
+
+ assertEqual = assertEquals = failUnlessEqual
+
+ assertNotEqual = assertNotEquals = failIfEqual
+
class CustomTestCase(StandardTestCase):
@@ -167,28 +189,6 @@ class CustomTestCase(StandardTestCase):
print >>sys.stderr, 'output: %r' % output
raise error
- def failUnlessEqual(self, first, second, msg=None):
- """Fail if the two objects are unequal as determined by the '=='
- operator.
- """
- if not first == second:
- raise self.failureException, \
- (msg or '%s != %s' % _format_str(first, second))
-
- def failIfEqual(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))
-
- # Synonyms for assertion methods
-
- assertEqual = assertEquals = failUnlessEqual
-
- assertNotEqual = assertNotEquals = failIfEqual
-
class CustomTestSuite(unittest.TestSuite):