Skip to content

Commit c0c3563

Browse files
authored
change test assertion to bypass python argparse bug (#874)
1 parent fd4475b commit c0c3563

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

tests/test_cli.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -137,10 +137,9 @@ def test_bad_option(self, caplog):
137137
self.registry,
138138
)
139139
assert err.value.args[0] == 3
140-
assert (
141-
"CLI error: ambiguous option: --codemod=url-sandbox could match --codemod-exclude, --codemod-include"
142-
in caplog.messages
143-
)
140+
msg = caplog.messages[0]
141+
assert "CLI error: ambiguous option: " in msg
142+
assert " could match --codemod-exclude, --codemod-include" in msg
144143

145144
@pytest.mark.parametrize("codemod", ["secure-random", "pixee:python/secure-random"])
146145
def test_codemod_name_or_id(self, codemod):

0 commit comments

Comments
 (0)