Skip to content

Commit 28b28d8

Browse files
committed
Adjust tests to use twine
1 parent 416d543 commit 28b28d8

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

squatter/tests/__init__.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,11 +88,16 @@ def test_cli_functional(self, check_call_mock: Any, check_output_mock: Any) -> N
8888

8989
def patched_check_call(cmd: List[str], **kwargs: Any) -> Any:
9090
nonlocal uploads
91-
if cmd[0] != "hatch":
92-
return check_call(cmd, **kwargs)
93-
else:
91+
if cmd[0] == "hatch":
9492
if "publish" in cmd:
9593
uploads += 1
94+
else:
95+
return check_call(cmd, **kwargs)
96+
elif cmd[0] == "twine":
97+
if "upload" in cmd:
98+
uploads += 1
99+
else:
100+
return check_call(cmd, **kwargs)
96101

97102
check_call_mock.side_effect = patched_check_call
98103

0 commit comments

Comments
 (0)