Skip to content

Commit

Permalink
Remove version check in assertRegex()
Browse files Browse the repository at this point in the history
  • Loading branch information
mthuurne committed Aug 8, 2020
1 parent f6e61ed commit 5a07f3e
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/twisted/trial/_synctest.py
Original file line number Diff line number Diff line change
Expand Up @@ -852,12 +852,7 @@ def assertRegex(self, text, regex, msg=None):
@param msg: Text used as the error message on failure.
@type msg: L{str}
"""
if sys.version_info[:2] > (2, 7):
super(_Assertions, self).assertRegex(text, regex, msg)
else:
# Python 2.7 has unittest.assertRegexpMatches() which was
# renamed to unittest.assertRegex() in Python 3.2
super(_Assertions, self).assertRegexpMatches(text, regex, msg)
super(_Assertions, self).assertRegex(text, regex, msg)



Expand Down

0 comments on commit 5a07f3e

Please sign in to comment.