|
22 | 22 | from git.test.lib import (
|
23 | 23 | TestBase,
|
24 | 24 | patch,
|
25 |
| - raises, |
26 | 25 | assert_true,
|
27 | 26 | fixture_path
|
28 | 27 | )
|
@@ -62,9 +61,8 @@ def test_call_unpack_args(self):
|
62 | 61 | mangled_value = 'Unicode\u20ac\u2122'
|
63 | 62 | self.assertEqual(args, ['git', 'log', '--', mangled_value])
|
64 | 63 |
|
65 |
| - @raises(GitCommandError) |
66 | 64 | def test_it_raises_errors(self):
|
67 |
| - self.git.this_does_not_exist() |
| 65 | + self.assertRaises(GitCommandError, self.git.this_does_not_exist) |
68 | 66 |
|
69 | 67 | def test_it_transforms_kwargs_into_git_command_arguments(self):
|
70 | 68 | self.assertEqual(["-s"], self.git.transform_kwargs(**{'s': True}))
|
@@ -99,10 +97,9 @@ def test_it_ignores_false_kwargs(self, git):
|
99 | 97 | self.git.version(pass_this_kwarg=False)
|
100 | 98 | assert_true("pass_this_kwarg" not in git.call_args[1])
|
101 | 99 |
|
102 |
| - @raises(GitCommandError) |
103 | 100 | def test_it_raises_proper_exception_with_output_stream(self):
|
104 | 101 | tmp_file = TemporaryFile()
|
105 |
| - self.git.checkout('non-existent-branch', output_stream=tmp_file) |
| 102 | + self.assertRaises(GitCommandError, self.git.checkout, 'non-existent-branch', output_stream=tmp_file) |
106 | 103 |
|
107 | 104 | def test_it_accepts_environment_variables(self):
|
108 | 105 | filename = fixture_path("ls_tree_empty")
|
|
0 commit comments