summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--git/test/lib/asserts.py14
-rw-r--r--git/test/test_git.py3
2 files changed, 2 insertions, 15 deletions
diff --git a/git/test/lib/asserts.py b/git/test/lib/asserts.py
index a520b1ea..2401e538 100644
--- a/git/test/lib/asserts.py
+++ b/git/test/lib/asserts.py
@@ -4,7 +4,6 @@
# This module is part of GitPython and is released under
# the BSD License: http://www.opensource.org/licenses/bsd-license.php
-import re
from unittest.mock import patch
from nose.tools import (
@@ -16,16 +15,5 @@ from nose.tools import (
assert_false # @UnusedImport
)
-__all__ = ['assert_not_none', 'assert_match',
- 'assert_equal', 'assert_not_equal', 'assert_raises', 'patch', 'raises',
+__all__ = ['assert_equal', 'assert_not_equal', 'assert_raises', 'patch', 'raises',
'assert_true', 'assert_false']
-
-
-def assert_not_none(actual, msg=None):
- """verify that item is None"""
- assert actual is not None, msg
-
-
-def assert_match(pattern, string, msg=None):
- """verify that the pattern matches the string"""
- assert_not_none(re.search(pattern, string), msg)
diff --git a/git/test/test_git.py b/git/test/test_git.py
index 965d7f39..2be39fce 100644
--- a/git/test/test_git.py
+++ b/git/test/test_git.py
@@ -25,7 +25,6 @@ from git.test.lib import (
raises,
assert_equal,
assert_true,
- assert_match,
fixture_path
)
from git.test.lib import with_rw_directory
@@ -87,7 +86,7 @@ class TestGit(TestBase):
self.assertEqual({'-s', '-t'}, set(res))
def test_it_executes_git_to_shell_and_returns_result(self):
- assert_match(r'^git version [\d\.]{2}.*$', self.git.execute(["git", "version"]))
+ self.assertRegex(self.git.execute(["git", "version"]), r'^git version [\d\.]{2}.*$')
def test_it_accepts_stdin(self):
filename = fixture_path("cat_file_blob")