Skip to content

Commit b0e8296

Browse files
committed
edit test
1 parent 7140906 commit b0e8296

File tree

1 file changed

+15
-4
lines changed

1 file changed

+15
-4
lines changed

test/test_status.py

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,23 @@ def rename_git():
1515
@pytest.mark.parametrize("short_flag", ["", "-s", "--short"])
1616
@pytest.mark.parametrize("long_flag", ["", "--long"])
1717
def test_status_format(rename_git, git2cpp_path, short_flag, long_flag):
18-
cmd = [git2cpp_path, 'status', short_flag, long_flag]
18+
cmd = [git2cpp_path, 'status']
19+
if short_flag != "":
20+
cmd.append(short_flag)
21+
if long_flag != "":
22+
cmd.append(long_flag)
1923
p = subprocess.run(cmd, capture_output=True, cwd="test/data/status_data", text=True)
2024

2125
if (long_flag == "--long") or ((long_flag == "") & (short_flag == "")):
2226
assert "Changes to be committed" in p.stdout
23-
elif short_flag in ["-s", "--short"]:
24-
pass
27+
assert "Changes not staged for commit" in p.stdout
28+
assert "Untracked files" in p.stdout
29+
assert "new file" in p.stdout
30+
assert "deleted" in p.stdout
31+
assert "modified" in p.stdout
2532

26-
print(p.stdout)
33+
elif short_flag in ["-s", "--short"]:
34+
assert "D " in p.stdout
35+
assert " M " in p.stdout
36+
assert " D " in p.stdout
37+
assert "?? " in p.stdout

0 commit comments

Comments
 (0)