diff options
author | Harmon <Harmon758@gmail.com> | 2020-02-16 15:48:50 -0600 |
---|---|---|
committer | Harmon <Harmon758@gmail.com> | 2020-02-16 16:17:06 -0600 |
commit | ab361cfecf9c0472f9682d5d18c405bd90ddf6d7 (patch) | |
tree | 35c9e437635786509189ed4aea64f297856be8ea /git/test/test_actor.py | |
parent | 99471bb594c365c7ad7ba99faa9e23ee78255eb9 (diff) | |
download | gitpython-ab361cfecf9c0472f9682d5d18c405bd90ddf6d7.tar.gz |
Replace assert_equal with assertEqual
Also change TestActor to subclass TestBase rather than object and create and use base TestCommitSerialization class for assert_commit_serialization method
Diffstat (limited to 'git/test/test_actor.py')
-rw-r--r-- | git/test/test_actor.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/git/test/test_actor.py b/git/test/test_actor.py index 9ba0aeba..010b82f6 100644 --- a/git/test/test_actor.py +++ b/git/test/test_actor.py @@ -4,16 +4,16 @@ # This module is part of GitPython and is released under # the BSD License: http://www.opensource.org/licenses/bsd-license.php -from git.test.lib import assert_equal +from git.test.lib import TestBase from git import Actor -class TestActor(object): +class TestActor(TestBase): def test_from_string_should_separate_name_and_email(self): a = Actor._from_string("Michael Trier <mtrier@example.com>") - assert_equal("Michael Trier", a.name) - assert_equal("mtrier@example.com", a.email) + self.assertEqual("Michael Trier", a.name) + self.assertEqual("mtrier@example.com", a.email) # base type capabilities assert a == a @@ -25,13 +25,13 @@ class TestActor(object): def test_from_string_should_handle_just_name(self): a = Actor._from_string("Michael Trier") - assert_equal("Michael Trier", a.name) - assert_equal(None, a.email) + self.assertEqual("Michael Trier", a.name) + self.assertEqual(None, a.email) def test_should_display_representation(self): a = Actor._from_string("Michael Trier <mtrier@example.com>") - assert_equal('<git.Actor "Michael Trier <mtrier@example.com>">', repr(a)) + self.assertEqual('<git.Actor "Michael Trier <mtrier@example.com>">', repr(a)) def test_str_should_alias_name(self): a = Actor._from_string("Michael Trier <mtrier@example.com>") - assert_equal(a.name, str(a)) + self.assertEqual(a.name, str(a)) |