summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Bruhin <me@the-compiler.org>2020-10-15 13:15:04 +0200
committerFlorian Bruhin <me@the-compiler.org>2020-10-15 13:15:04 +0200
commitaffb39a9baf9d536ad402c665f5179e64bcafe2c (patch)
treed36f2ddeaf97d4ffe6367a5c27d40a80a8bc39ec
parent0d7d534df80b8a3284af0d76136e1247b8607a2e (diff)
downloadqutebrowser-affb39a9baf9d536ad402c665f5179e64bcafe2c.tar.gz
qutebrowser-affb39a9baf9d536ad402c665f5179e64bcafe2c.zip
tests: Fix filtering in test_from_str_hypothesis
The "klass" is a functools.partial instance, not the "typ" (which is the instance)... Also, the second check is not needed as we're filtering out all ListOrValue instances out already anyways...
-rw-r--r--tests/unit/config/test_configtypes.py10
1 files changed, 3 insertions, 7 deletions
diff --git a/tests/unit/config/test_configtypes.py b/tests/unit/config/test_configtypes.py
index a98584164..f10807513 100644
--- a/tests/unit/config/test_configtypes.py
+++ b/tests/unit/config/test_configtypes.py
@@ -248,16 +248,12 @@ class TestAll:
configtypes.PercOrInt, # ditto
]:
return
- elif (isinstance(typ, functools.partial) and
- isinstance(typ.func, (configtypes.ListOrValue,
- configtypes.List))):
+ elif (isinstance(klass, functools.partial) and
+ isinstance(klass.func, (configtypes.ListOrValue,
+ configtypes.List))):
# ListOrValue: "- /" -> "/"
# List: "- /" -> ["/"]
return
- elif (isinstance(typ, configtypes.ListOrValue) and
- isinstance(typ.valtype, configtypes.Int)):
- # "00" -> "0"
- return
assert converted == s