mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-01-05 12:44:13 +00:00
exclude nul from the tested argv values
This commit is contained in:
parent
c2e8d94a73
commit
6d499dea53
@ -57,6 +57,7 @@ from hypothesis import (
|
|||||||
from hypothesis.strategies import (
|
from hypothesis.strategies import (
|
||||||
lists,
|
lists,
|
||||||
text,
|
text,
|
||||||
|
characters,
|
||||||
)
|
)
|
||||||
|
|
||||||
from .common import (
|
from .common import (
|
||||||
@ -93,7 +94,23 @@ class GetArgvTests(SyncTestCase):
|
|||||||
suppress_health_check=[HealthCheck.too_slow],
|
suppress_health_check=[HealthCheck.too_slow],
|
||||||
deadline=None,
|
deadline=None,
|
||||||
)
|
)
|
||||||
@given(lists(text(min_size=1, max_size=4), min_size=1, max_size=4))
|
@given(
|
||||||
|
lists(
|
||||||
|
text(
|
||||||
|
alphabet=characters(
|
||||||
|
blacklist_categories=('Cs',),
|
||||||
|
# Windows CommandLine is a null-terminated string,
|
||||||
|
# analogous to POSIX exec* arguments. So exclude nul from
|
||||||
|
# our generated arguments.
|
||||||
|
blacklist_characters=('\x00',),
|
||||||
|
),
|
||||||
|
min_size=1,
|
||||||
|
max_size=4,
|
||||||
|
),
|
||||||
|
min_size=1,
|
||||||
|
max_size=4,
|
||||||
|
),
|
||||||
|
)
|
||||||
def test_argv_values(self, argv):
|
def test_argv_values(self, argv):
|
||||||
"""
|
"""
|
||||||
``get_argv`` returns a list representing the result of tokenizing the
|
``get_argv`` returns a list representing the result of tokenizing the
|
||||||
|
Loading…
Reference in New Issue
Block a user