Remove deprecated Parser.addoption backward compatibilities

This commit is contained in:
Ran Benita
2024-01-01 13:22:02 +02:00
parent 1f8b39ed32
commit 10fbb2325f
4 changed files with 14 additions and 68 deletions

View File

@@ -54,9 +54,6 @@ class TestParser:
assert argument.type is str
argument = parseopt.Argument("-t", dest="abc", type=float)
assert argument.type is float
with pytest.warns(DeprecationWarning):
with pytest.raises(KeyError):
argument = parseopt.Argument("-t", dest="abc", type="choice")
argument = parseopt.Argument(
"-t", dest="abc", type=str, choices=["red", "blue"]
)