Skip to content

Commit 8082673

Browse files
committed
update test
1 parent 7ee91ab commit 8082673

File tree

1 file changed

+5
-13
lines changed

1 file changed

+5
-13
lines changed

test/test_commit.py

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -18,21 +18,13 @@ def test_add(git2cpp_path, all_flag):
1818
assert "Changes to be committed" in p_status.stdout
1919
assert "new file" in p_status.stdout
2020

21-
cmd_commit = [git2cpp_path, 'commit', "--soft", "-m", "test commit"]
21+
cmd_commit = [git2cpp_path, 'commit', "-m", "test commit"]
2222
subprocess.run(cmd_commit, capture_output=True, text=True)
2323

2424
cmd_status_2 = [git2cpp_path, 'status', "--long"]
25-
p_status_2 = subprocess.run(cmd_status_2, capture_output=True, text=True)
25+
subprocess.run(cmd_status_2, capture_output=True, text=True)
2626

27-
print(p_status_2.stdout)
27+
assert "mook_file" not in p_status.stdout
2828

29-
# assert "mook_file" not in p_status.stdout
30-
31-
os.remove("./test/mook_file.txt")
32-
33-
# TODO: git reset
34-
#
35-
# run status + assert
36-
37-
# undo the add, to leave the test directory at the end the same as it was at the start
38-
subprocess.run(cmd_add, capture_output=True, text=True)
29+
cmd_reset = [git2cpp_path, 'reset', "--hard", "HEAD~1"]
30+
subprocess.run(cmd_reset, capture_output=True, text=True)

0 commit comments

Comments
 (0)