mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
Pythhon3.7: re module has no re._pattern_type
Signed-off-by: Christian Heimes <cheimes@redhat.com> Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
This commit is contained in:
@@ -46,6 +46,9 @@ else:
|
||||
yield_fixture = pytest.fixture
|
||||
|
||||
|
||||
pattern_type = type(re.compile(""))
|
||||
|
||||
|
||||
class Prop(object):
|
||||
def __init__(self, *ops):
|
||||
self.__ops = frozenset(ops)
|
||||
@@ -83,13 +86,13 @@ class test_Fuzzy(object):
|
||||
assert inst.regex == '(foo|bar)'
|
||||
assert inst.type is unicode
|
||||
assert inst.test is None
|
||||
assert isinstance(inst.re, re._pattern_type)
|
||||
assert isinstance(inst.re, pattern_type)
|
||||
|
||||
inst = self.klass('(foo|bar)', type=str)
|
||||
assert inst.regex == '(foo|bar)'
|
||||
assert inst.type is str
|
||||
assert inst.test is None
|
||||
assert isinstance(inst.re, re._pattern_type)
|
||||
assert isinstance(inst.re, pattern_type)
|
||||
|
||||
t = lambda other: other > 500
|
||||
|
||||
|
||||
Reference in New Issue
Block a user