diff options
author | Florian Bruhin <me@the-compiler.org> | 2020-10-15 13:15:04 +0200 |
---|---|---|
committer | Florian Bruhin <me@the-compiler.org> | 2020-10-15 13:15:04 +0200 |
commit | affb39a9baf9d536ad402c665f5179e64bcafe2c (patch) | |
tree | d36f2ddeaf97d4ffe6367a5c27d40a80a8bc39ec | |
parent | 0d7d534df80b8a3284af0d76136e1247b8607a2e (diff) | |
download | qutebrowser-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.py | 10 |
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 |