Author: labath Date: Thu Dec 27 07:16:37 2018 New Revision: 350093 URL: http://llvm.org/viewvc/llvm-project?rev=350093&view=rev Log: Fix tests for python 3.7
python 3.7 removes re._pattern_type. Fix the one place where we were depending on the type of regular expressions to compute the type dynamically. Modified: lldb/trunk/packages/Python/lldbsuite/test/decorators.py Modified: lldb/trunk/packages/Python/lldbsuite/test/decorators.py URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/decorators.py?rev=350093&r1=350092&r2=350093&view=diff ============================================================================== --- lldb/trunk/packages/Python/lldbsuite/test/decorators.py (original) +++ lldb/trunk/packages/Python/lldbsuite/test/decorators.py Thu Dec 27 07:16:37 2018 @@ -74,13 +74,14 @@ def _check_expected_version(comparison, 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) _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits