def test_unicode_shorthand_ascii_only(self):
"""Ensure that when the Unicode flag is not used, only ASCII properties are used."""
flags = bre.ASCII if PY3 else 0
pattern = bre.compile_search(r'ex\lmple', flags)
m = pattern.match('exámple')
self.assertTrue(m is None)
m = pattern.match('example')
self.assertTrue(m is not None)
评论列表
文章目录