summaryrefslogtreecommitdiff
path: root/tests/unit/config/test_configtypes.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/unit/config/test_configtypes.py')
-rw-r--r--tests/unit/config/test_configtypes.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/unit/config/test_configtypes.py b/tests/unit/config/test_configtypes.py
index 3e1d15099..66b152937 100644
--- a/tests/unit/config/test_configtypes.py
+++ b/tests/unit/config/test_configtypes.py
@@ -1839,6 +1839,11 @@ class TestFormatString:
with pytest.raises(configexc.ValidationError):
typ.to_py(val)
+ def test_invalid_encoding(self, klass):
+ typ = klass(fields=[], encoding='ascii')
+ with pytest.raises(configexc.ValidationError):
+ typ.to_py('fooƤbar')
+
@pytest.mark.parametrize('value', [
None,
['one', 'two'],