summaryrefslogtreecommitdiff
path: root/git/test/test_reflog.py
diff options
context:
space:
mode:
authorHarmon <Harmon758@gmail.com>2020-02-16 13:46:25 -0600
committerHarmon <Harmon758@gmail.com>2020-02-16 13:52:26 -0600
commit7cf0ca8b94dc815598e354d17d87ca77f499cae6 (patch)
tree4f6804ce8fdd8a9f13a83d3516037be0fe8cda7a /git/test/test_reflog.py
parent2c429fc0382868c22b56e70047b01c0567c0ba31 (diff)
downloadgitpython-7cf0ca8b94dc815598e354d17d87ca77f499cae6.tar.gz
Replace deprecated failUnlessRaises alias with assertRaises in tests
Diffstat (limited to 'git/test/test_reflog.py')
-rw-r--r--git/test/test_reflog.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/git/test/test_reflog.py b/git/test/test_reflog.py
index 20495be1..db5f2783 100644
--- a/git/test/test_reflog.py
+++ b/git/test/test_reflog.py
@@ -23,7 +23,7 @@ class TestRefLog(TestBase):
actor = Actor('name', 'email')
msg = "message"
- self.failUnlessRaises(ValueError, RefLogEntry.new, nullhexsha, hexsha, 'noactor', 0, 0, "")
+ self.assertRaises(ValueError, RefLogEntry.new, nullhexsha, hexsha, 'noactor', 0, 0, "")
e = RefLogEntry.new(nullhexsha, hexsha, actor, 0, 1, msg)
assert e.oldhexsha == nullhexsha
@@ -59,11 +59,11 @@ class TestRefLog(TestBase):
# TODO: Try multiple corrupted ones !
pp = 'reflog_invalid_'
for suffix in ('oldsha', 'newsha', 'email', 'date', 'sep'):
- self.failUnlessRaises(ValueError, RefLog.from_file, fixture_path(pp + suffix))
+ self.assertRaises(ValueError, RefLog.from_file, fixture_path(pp + suffix))
# END for each invalid file
# cannot write an uninitialized reflog
- self.failUnlessRaises(ValueError, RefLog().write)
+ self.assertRaises(ValueError, RefLog().write)
# test serialize and deserialize - results must match exactly
binsha = hex_to_bin(('f' * 40).encode('ascii'))
@@ -91,7 +91,7 @@ class TestRefLog(TestBase):
# index entry
# raises on invalid index
- self.failUnlessRaises(IndexError, RefLog.entry_at, rlp, 10000)
+ self.assertRaises(IndexError, RefLog.entry_at, rlp, 10000)
# indices can be positive ...
assert isinstance(RefLog.entry_at(rlp, 0), RefLogEntry)