Skip to content

Commit 7611cd9

Browse files
committed
Don't check form of version number
This changes the regex in test_it_executes_git_not_from_cwd so that (unlike test_it_executes_git_to_shell_and_returns_result) it only checks that the output starts with the words "git version", and not the form of whatever follows those words.
1 parent 94e0fb0 commit 7611cd9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test/test_git.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ def test_it_executes_git_not_from_cwd(self):
103103
os.chmod(impostor_path, 0o755)
104104

105105
with _chdir(tmpdir):
106-
self.assertRegex(self.git.execute(["git", "version"]), r"^git version [\d\.]{2}.*$")
106+
self.assertRegex(self.git.execute(["git", "version"]), r"^git version\b")
107107

108108
def test_it_accepts_stdin(self):
109109
filename = fixture_path("cat_file_blob")

0 commit comments

Comments
 (0)