@@ -36,19 +36,19 @@ def __getattribute__(self, attr_name):
3636 def test_all_attribute_reads_are_caught (self ):
3737 catcher = self .CatchAllAttributeReads ()
3838
39- self .assertRegexpMatches (catcher .foobar , __ )
39+ self .assertRegex (catcher .foobar , __ )
4040
4141 def test_intercepting_return_values_can_disrupt_the_call_chain (self ):
4242 catcher = self .CatchAllAttributeReads ()
4343
44- self .assertRegexpMatches (catcher .foobaz , __ ) # This is fine
44+ self .assertRegex (catcher .foobaz , __ ) # This is fine
4545
4646 try :
4747 catcher .foobaz (1 )
4848 except TypeError as ex :
4949 err_msg = ex .args [0 ]
5050
51- self .assertRegexpMatches (err_msg , __ )
51+ self .assertRegex (err_msg , __ )
5252
5353 # foobaz returns a string. What happens to the '(1)' part?
5454 # Try entering this into a python console to reproduce the issue:
@@ -59,7 +59,7 @@ def test_intercepting_return_values_can_disrupt_the_call_chain(self):
5959 def test_changes_to_the_getattribute_implementation_affects_getattr_function (self ):
6060 catcher = self .CatchAllAttributeReads ()
6161
62- self .assertRegexpMatches (getattr (catcher , 'any_attribute' ), __ )
62+ self .assertRegex (getattr (catcher , 'any_attribute' ), __ )
6363
6464 # ------------------------------------------------------------------
6565
0 commit comments