37 lines
1.3 KiB
Diff
37 lines
1.3 KiB
Diff
|
From 541e6184fca60a01ff7e8c1bba794c083ac4245f Mon Sep 17 00:00:00 2001
|
||
|
From: =?UTF-8?q?Jan=20Pokorn=C3=BD?= <jpokorny@redhat.com>
|
||
|
Date: Tue, 10 Jul 2018 19:25:34 +0200
|
||
|
Subject: [PATCH] test: drop underqualified identifier in unittest's 2.6 compat
|
||
|
"polyfill"
|
||
|
MIME-Version: 1.0
|
||
|
Content-Type: text/plain; charset=UTF-8
|
||
|
Content-Transfer-Encoding: 8bit
|
||
|
|
||
|
Specifically, in supplemented unittest.TestCase.assertRegexpMatches
|
||
|
method. In Python 2.7's implementation, there's no re.MULTILINE
|
||
|
modifier at that very place, either.
|
||
|
|
||
|
Not sure what the original purpose of introducing that with c1c47f5 was.
|
||
|
|
||
|
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
|
||
|
---
|
||
|
test/assertions.py | 2 +-
|
||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||
|
|
||
|
diff --git a/test/assertions.py b/test/assertions.py
|
||
|
index 34333ca..fafb291 100644
|
||
|
--- a/test/assertions.py
|
||
|
+++ b/test/assertions.py
|
||
|
@@ -23,7 +23,7 @@ class BoothAssertions:
|
||
|
"""Fail the test unless the text matches the regular expression."""
|
||
|
if isinstance(expected_regexp, str):
|
||
|
expected_regexp = re.compile(expected_regexp)
|
||
|
- if not expected_regexp.search(text, MULTILINE):
|
||
|
+ if not expected_regexp.search(text):
|
||
|
msg = msg or "Regexp didn't match"
|
||
|
msg = '%s: %r not found in %r' % (msg, expected_regexp.pattern, text)
|
||
|
raise self.failureException(msg)
|
||
|
--
|
||
|
2.18.0.rc2
|
||
|
|