Example #1
0
def test__regexp_validator_invalid():
    with pytest.raises(sre_constants.error):
        config._regexp_validator(None, None, "test_)")
Example #2
0
def test__regexp_validator_invalid():
    with pytest.raises(sre_constants.error):
        config._regexp_validator(None, None, "test_)")
Example #3
0
def test__regexp_validator_valid():
    result = config._regexp_validator(None, None, "test_.*")
    assert isinstance(result, re._pattern_type)
    assert result.pattern == "test_.*"
Example #4
0
 def test__regexp_validator_invalid(self):
     with self.assertRaises(sre_constants.error):
         config._regexp_validator(None, None, "test_)")
Example #5
0
def test__regexp_validator_valid():
    result = config._regexp_validator(None, None, "test_.*")
    assert isinstance(result, re._pattern_type)
    assert result.pattern == "test_.*"
Example #6
0
 def test__regexp_validator_valid(self):
     result = config._regexp_validator(None, None, "test_.*")
     self.assertTrue(isinstance(result, re._pattern_type))
     self.assertEqual(result.pattern, "test_.*")
Example #7
0
def test__regexp_validator_valid():
    result = config._regexp_validator(None, None, "test_.*")
    assert isinstance(result, RE_PATTERN_TYPE)
    assert result.pattern == "test_.*"
def test__regexp_validator_valid():
    result = config._regexp_validator(None, None, "test_.*")
    assert isinstance(result, RE_PATTERN_TYPE)
    assert result.pattern == "test_.*"
Example #9
0
 def test__regexp_validator_invalid(self):
     with self.assertRaises(sre_constants.error):
         config._regexp_validator(None, None, "test_)")
Example #10
0
 def test__regexp_validator_valid(self):
     result = config._regexp_validator(None, None, "test_.*")
     self.assertTrue(isinstance(result, re._pattern_type))
     self.assertEqual(result.pattern, "test_.*")