'Test a simulated bad pattern warning.
This only seems to happen with Python 3.5, so we simulate this for
better coverage.'

def test_bad_pattern_warning(self, mocker, klass):

    m = mocker.patch('qutebrowser.config.configtypes.re')
    m.compile.side_effect = (lambda *args: warnings.warn('bad    escape    \\C', DeprecationWarning))
    m.error = re.error
    with pytest.raises(configexc.ValidationError):
        klass().validate('foo')
