Add some more tests

This commit is contained in:
Luca Benci 2017-10-18 20:30:16 +02:00
parent 0d7a557396
commit 937d0d0688

View File

@ -1832,6 +1832,11 @@ class TestShellCommand:
({'placeholder': True}, '[foo, "{", "}", bar'),
({'placeholder': True}, '[foo, bar]'),
({'placeholder': True}, '[foo, "{fi", "le}", bar'),
# Like valid ones but with wrong placeholder
({'placeholder': True}, '[f, "{wrong}", b]'),
({'placeholder': True}, '["f{wrong}b"]'),
({'placeholder': True}, '[f, "b {wrong}"]'),
])
def test_from_str_invalid(self, klass, kwargs, val):
with pytest.raises(configexc.ValidationError):