diff options
Diffstat (limited to 'tests/unit/completion/test_models.py')
-rw-r--r-- | tests/unit/completion/test_models.py | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/tests/unit/completion/test_models.py b/tests/unit/completion/test_models.py index 8a6b24557..22e9c6490 100644 --- a/tests/unit/completion/test_models.py +++ b/tests/unit/completion/test_models.py @@ -28,7 +28,7 @@ from datetime import datetime from unittest import mock import hypothesis -import hypothesis.strategies +import hypothesis.strategies as hst import pytest from PyQt5.QtCore import QUrl, QDateTime try: @@ -459,9 +459,10 @@ def test_filesystem_completion_model_interface(info, local_files_path): @hypothesis.given( - as_uri=hypothesis.strategies.booleans(), - add_sep=hypothesis.strategies.booleans(), - text=hypothesis.strategies.text(), + as_uri=hst.booleans(), + add_sep=hst.booleans(), + text=hst.text(alphabet=hst.characters( + blacklist_categories=['Cc'], blacklist_characters='\x00')), ) def test_filesystem_completion_hypothesis(info, as_uri, add_sep, text): if as_uri: @@ -1445,7 +1446,7 @@ def undo_completion_retains_sort_order(tabbed_browser_stubs, info): _check_completions(model, {"Closed tabs": expected}) -@hypothesis.given(text=hypothesis.strategies.text()) +@hypothesis.given(text=hst.text()) def test_listcategory_hypothesis(text): """Make sure we can't produce invalid patterns.""" cat = listcategory.ListCategory("test", []) |