| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -7,11 +7,9 @@ | |||
| 7 | 7 | from unittest.mock import patch | |
| 8 | 8 | ||
| 9 | 9 | from nose.tools import ( | |
| 10 | - assert_raises, # @UnusedImport | ||
| 11 | 10 | raises, # @UnusedImport | |
| 12 | 11 | assert_true, # @UnusedImport | |
| 13 | 12 | assert_false # @UnusedImport | |
| 14 | 13 | ) | |
| 15 | 14 | ||
| 16 | - __all__ = ['assert_raises', 'patch', 'raises', | ||
| 17 | - 'assert_true', 'assert_false'] | ||
| 15 | + __all__ = ['patch', 'raises', 'assert_true', 'assert_false'] | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -19,7 +19,6 @@ | |||
| 19 | 19 | from git.objects.util import get_object_type_by_name | |
| 20 | 20 | from git.test.lib import ( | |
| 21 | 21 | TestBase, | |
| 22 | - assert_raises, | ||
| 23 | 22 | with_rw_repo, | |
| 24 | 23 | with_rw_and_rw_remote_repo | |
| 25 | 24 | ) | |
@@ -96,7 +95,7 @@ def test_get_object_type_by_name(self): | |||
| 96 | 95 | assert base.Object in get_object_type_by_name(tname).mro() | |
| 97 | 96 | # END for each known type | |
| 98 | 97 | ||
| 99 | - assert_raises(ValueError, get_object_type_by_name, b"doesntexist") | ||
| 98 | + self.assertRaises(ValueError, get_object_type_by_name, b"doesntexist") | ||
| 100 | 99 | ||
| 101 | 100 | def test_object_resolution(self): | |
| 102 | 101 | # objects must be resolved to shas so they compare equal | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -27,8 +27,7 @@ | |||
| 27 | 27 | with_rw_repo, | |
| 28 | 28 | with_rw_and_rw_remote_repo, | |
| 29 | 29 | fixture, | |
| 30 | - GIT_DAEMON_PORT, | ||
| 31 | - assert_raises | ||
| 30 | + GIT_DAEMON_PORT | ||
| 32 | 31 | ) | |
| 33 | 32 | from git.util import rmtree, HIDE_WINDOWS_FREEZE_ERRORS | |
| 34 | 33 | import os.path as osp | |
@@ -626,7 +625,7 @@ def test_multiple_urls(self, rw_repo): | |||
| 626 | 625 | self.assertEqual(list(remote.urls), [test1, test2]) | |
| 627 | 626 | ||
| 628 | 627 | # will raise: fatal: --add --delete doesn't make sense | |
| 629 | - assert_raises(GitCommandError, remote.set_url, test2, add=True, delete=True) | ||
| 628 | + self.assertRaises(GitCommandError, remote.set_url, test2, add=True, delete=True) | ||
| 630 | 629 | ||
| 631 | 630 | # Testing on another remote, with the add/delete URL | |
| 632 | 631 | remote = rw_repo.create_remote('another', url=test1) | |
@@ -640,7 +639,7 @@ def test_multiple_urls(self, rw_repo): | |||
| 640 | 639 | remote.delete_url(test1) | |
| 641 | 640 | self.assertEqual(list(remote.urls), [test3]) | |
| 642 | 641 | # will raise fatal: Will not delete all non-push URLs | |
| 643 | - assert_raises(GitCommandError, remote.delete_url, test3) | ||
| 642 | + self.assertRaises(GitCommandError, remote.delete_url, test3) | ||
| 644 | 643 | ||
| 645 | 644 | def test_fetch_error(self): | |
| 646 | 645 | rem = self.rorepo.remote('origin') | |
| Back | FazBrowse Home | New Git URL |
0 commit comments