Skip to content

Commit c1c2bc1

Browse files
author
Thomas Grainger
committed
use nose.tools assert_raises everywhere
1 parent 24f1714 commit c1c2bc1

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

tests/test_apply.py

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -125,13 +125,8 @@ def test_diff_unified_patchutil(self):
125125
new_text = _apply(self.lao, diff_text, use_patch=True)
126126
self.assertEqual(new_text, (self.tzu, None))
127127

128-
def _do_apply():
129-
return _apply([''] + self.lao, diff_text, use_patch=True)
130-
131-
self.assertRaises(
132-
exceptions.ApplyException,
133-
_do_apply,
134-
)
128+
with assert_raises(exceptions.ApplyException):
129+
_apply([''] + self.lao, diff_text, use_patch=True)
135130

136131
def test_diff_rcs(self):
137132
with open('tests/casefiles/diff-rcs.diff') as f:

0 commit comments

Comments
 (0)