def test_no_pattern_error(): e = configexc.NoPatternError('foo') expected = "The foo setting does not support URL patterns!" assert str(e) == expected
def _check_pattern_support( self, arg: Union[urlmatch.UrlPattern, QUrl, None]) -> None: """Make sure patterns are supported if one was given.""" if arg is not None and not self.opt.supports_pattern: raise configexc.NoPatternError(self.opt.name)
def _check_pattern_support(self, arg): """Make sure patterns are supported if one was given.""" if arg is not None and not self.opt.supports_pattern: raise configexc.NoPatternError(self.opt.name)