diff options
author | Lembrun <amadeusk7@free.fr> | 2021-03-09 22:41:55 +0100 |
---|---|---|
committer | Lembrun <amadeusk7@free.fr> | 2021-03-09 22:41:55 +0100 |
commit | c346afcc9edff4d4be3ffa5898961779e76c3981 (patch) | |
tree | 508bf6478609f2c5a41ee7a1a790ea9eac0331c1 /tests/unit/completion/test_models.py | |
parent | 38311a69a898dd44ea76fd80e271f10a6b235114 (diff) | |
parent | 0a38fff4c675b384289728a4d45f9c1fe1f9d4fc (diff) | |
download | qutebrowser-c346afcc9edff4d4be3ffa5898961779e76c3981.tar.gz qutebrowser-c346afcc9edff4d4be3ffa5898961779e76c3981.zip |
Merge branch 'master' into pathlib-/unit/completion
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 15ebe7110..f4d27dfbb 100644 --- a/tests/unit/completion/test_models.py +++ b/tests/unit/completion/test_models.py @@ -29,7 +29,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: @@ -460,9 +460,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: @@ -1446,7 +1447,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", []) |