diff options
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test')
-rw-r--r-- | lldb/packages/Python/lldbsuite/test/decorators.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/decorators.py b/lldb/packages/Python/lldbsuite/test/decorators.py index cacd718f783..2458a6f8745 100644 --- a/lldb/packages/Python/lldbsuite/test/decorators.py +++ b/lldb/packages/Python/lldbsuite/test/decorators.py @@ -74,13 +74,14 @@ def _check_expected_version(comparison, expected, actual): LooseVersion(expected_str)) +_re_pattern_type = type(re.compile('')) def _match_decorator_property(expected, actual): if actual is None or expected is None: return True if isinstance(expected, no_match): return not _match_decorator_property(expected.item, actual) - elif isinstance(expected, (re._pattern_type,) + six.string_types): + elif isinstance(expected, (_re_pattern_type,) + six.string_types): return re.search(expected, actual) is not None elif hasattr(expected, "__iter__"): return any([x is not None and _match_decorator_property(x, actual) |