summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Bruhin <me@the-compiler.org>2020-04-21 10:54:58 +0200
committerFlorian Bruhin <me@the-compiler.org>2020-04-21 12:13:07 +0200
commitd8d9311c2e1fe9c3981febe15774aec8849a2934 (patch)
tree1932c32d5808cff48f91837f8c4096d9a4d8cc97
parentcff65b4904724043775ff4b56fba70fbdc9de600 (diff)
downloadqutebrowser-d8d9311c2e1fe9c3981febe15774aec8849a2934.tar.gz
qutebrowser-d8d9311c2e1fe9c3981febe15774aec8849a2934.zip
tests: Fix check for ListOrValue
We use ListOrValue with functools.partial, so we will need to check for that. Additionally, this can yield different results for any value type, not just ints. Fixes a possible hypothesis test failure: https://travis-ci.org/github/qutebrowser/qutebrowser/jobs/677590734
-rw-r--r--tests/unit/config/test_configtypes.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/tests/unit/config/test_configtypes.py b/tests/unit/config/test_configtypes.py
index 97cb4fbf0..25c1b12e9 100644
--- a/tests/unit/config/test_configtypes.py
+++ b/tests/unit/config/test_configtypes.py
@@ -262,8 +262,11 @@ class TestAll:
configtypes.PercOrInt, # ditto
]:
return
- if (isinstance(typ, configtypes.ListOrValue) and
- isinstance(typ.valtype, configtypes.Int)):
+
+ if (isinstance(typ, functools.partial) and
+ isinstance(typ.func, configtypes.ListOrValue)):
+ # in: "- /"
+ # out: "/"
return
assert converted == s