From 7d152d23fc64ef8b4f205beb137501586f08854a Mon Sep 17 00:00:00 2001 From: John Rouillard Date: Tue, 26 Mar 2024 15:01:10 -0400 Subject: [PATCH] test: map assertRegexpMatches to assertRegex for python2 --- test/test_cgi.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/test_cgi.py b/test/test_cgi.py index e2f0b281..48f58441 100644 --- a/test/test_cgi.py +++ b/test/test_cgi.py @@ -3080,6 +3080,10 @@ def testReadfile(self): def testExpandfile(self): # test for templates in subdirectories + # remove when no longer supporting python 2 + if not hasattr(self, 'assertRegex'): + self.assertRegex = self.assertRegexpMatches + # make the directory subdir = self.dirname + "/html/subdir" os.mkdir(subdir)