Skip to content

Commit 2c0066b

Browse files
committed
Fix tests
1 parent 7ad4d8e commit 2c0066b

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

test/test_git.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ def test_error_on_unknown_option(git2cpp_path):
2121
p = subprocess.run(cmd, capture_output=True)
2222
assert p.returncode == 109
2323
assert p.stdout == b""
24-
assert p.stderr.startswith(b"The following argument was not expected: --unknown")
24+
assert b"The following argument was not expected: --unknown" in p.stderr
2525

2626

2727
@pytest.mark.skipif(not GIT2CPP_TEST_WASM, reason="Only test in WebAssembly")

test/test_init.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,15 +97,15 @@ def test_error_on_unknown_option(git2cpp_path):
9797
p = subprocess.run(cmd, capture_output=True)
9898
assert p.returncode == 109
9999
assert p.stdout == b""
100-
assert p.stderr.startswith(b"The following argument was not expected: --unknown")
100+
assert b"The following argument was not expected: --unknown" in p.stderr
101101

102102

103103
def test_error_on_repeated_directory(git2cpp_path):
104104
cmd = [git2cpp_path, "init", "abc", "def"]
105105
p = subprocess.run(cmd, capture_output=True)
106106
assert p.returncode == 109
107107
assert p.stdout == b""
108-
assert p.stderr.startswith(b"The following argument was not expected: def")
108+
assert b"The following argument was not expected: def" in p.stderr
109109

110110

111111
def test_init_creates_missing_parent_directories(git2cpp_path, tmp_path):

0 commit comments

Comments
 (0)