Skip to content

Commit

Permalink
Don't check form of version number
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
EliahKagan committed Aug 30, 2023
1 parent 94e0fb0 commit 7611cd9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/test_git.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ def test_it_executes_git_not_from_cwd(self):
os.chmod(impostor_path, 0o755)

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

def test_it_accepts_stdin(self):
filename = fixture_path("cat_file_blob")
Expand Down

0 comments on commit 7611cd9

Please sign in to comment.