Skip to content

Clean up assert_equal tests #66

Merged
merged 2 commits into from Apr 24, 2012
View
8 test/assertions_test.py
@@ -6,12 +6,12 @@
class DiffMessageTestCase(TestCase):
- def test_it_shows_string_diffs(self):
+ def test_shows_string_diffs(self):
expected = 'Diff:\nl: abc<>\nr: abc<def>'
diff_message = assertions._diff_message('abc', 'abcdef')
assert_equal(expected, diff_message)
- def test_it_shows_repr_diffs(self):
+ def test_shows_repr_diffs(self):
class AbcRepr(object):
__repr__ = lambda self: 'abc'
@@ -25,7 +25,7 @@ class AbcDefRepr(object):
class AssertEqualTestCase(TestCase):
- def test_it_shows_pretty_diff_output(self):
+ def test_shows_pretty_diff_output(self):
expected = \
'assertion failed: l == r\n' \
"l: 'that reviewboard differ is awesome'\n" \
@@ -39,7 +39,7 @@ def test_it_shows_pretty_diff_output(self):
'dat reviewboard differ is ozsom')
except AssertionError, e:
assert_equal(expected, e.args[0])
- except:
+ else:
assert False, 'Expected `AssertionError`.'
Something went wrong with that request. Please try again.