diff options
Diffstat (limited to 'testsuite')
-rw-r--r-- | testsuite/common.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/testsuite/common.py b/testsuite/common.py index 82a15b71b..fc79e73e7 100644 --- a/testsuite/common.py +++ b/testsuite/common.py @@ -164,6 +164,11 @@ class Bcfg2TestCase(unittest.TestCase): # assertRegexpMatches, but have the other convenience methods. assertRegexpMatches = _assertion(lambda s, r: _regex_matches(s, r), "%s does not contain /%s/") + + if not hasattr(unittest.TestCase, "assertNotRegexpMatches"): + # Some versions of TestCase in Py3k seem to lack + # assertNotRegexpMatches even though they have + # assertRegexpMatches assertNotRegexpMatches = \ _assertion(lambda s, r: not _regex_matches(s, r), "%s contains /%s/") |