From d8d9311c2e1fe9c3981febe15774aec8849a2934 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Tue, 21 Apr 2020 10:54:58 +0200 Subject: 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 --- tests/unit/config/test_configtypes.py | 7 +++++-- 1 file 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 -- cgit v1.2.3-54-g00ecf