@@ -281,7 +281,7 @@ def t():
281281 s .throw (TaskletExit )
282282 # the tasklet should be dead
283283 stackless .run ()
284- self .assertRaisesRegexp (RuntimeError , "dead" , s .run )
284+ self .assertRaisesRegex (RuntimeError , "dead" , s .run )
285285
286286 def test_dead (self ):
287287 c = stackless .channel ()
@@ -684,7 +684,7 @@ def test_handler(self):
684684 def test_borken_handler (self ):
685685 stackless .tasklet (self .func )(self .borken_handler )
686686 with self .handlerctxt (self .borken_handler ):
687- self .assertRaisesRegexp (IndexError , "mods" , stackless .run )
687+ self .assertRaisesRegex (IndexError , "mods" , stackless .run )
688688 self .assertTrue (self .ran )
689689 self .assertTrue (self .handled )
690690
@@ -871,13 +871,13 @@ def test_bind(self):
871871
872872 self .assertFalse (t .alive )
873873 self .assertIsNone (t .frame )
874- self .assertEquals (t .nesting_level , 0 )
874+ self .assertEqual (t .nesting_level , 0 )
875875
876876 t .bind (None ) # must not change the tasklet
877877
878878 self .assertFalse (t .alive )
879879 self .assertIsNone (t .frame )
880- self .assertEquals (t .nesting_level , 0 )
880+ self .assertEqual (t .nesting_level , 0 )
881881
882882 t .bind (self .task )
883883 t .setup (False )
@@ -900,7 +900,7 @@ def test_bind(self):
900900 def test_bind_fail_not_callable (self ):
901901 class C (object ):
902902 pass
903- self .assertRaisesRegexp (TypeError , "callable" , stackless .getcurrent ().bind , C ())
903+ self .assertRaisesRegex (TypeError , "callable" , stackless .getcurrent ().bind , C ())
904904
905905 def test_unbind_ok (self ):
906906 if not stackless .enable_softswitch (None ):
@@ -926,7 +926,7 @@ def test_unbind_ok(self):
926926 self .assertEqual (self .finally_run_count , 0 )
927927
928928 def test_unbind_fail_current (self ):
929- self .assertRaisesRegexp (RuntimeError , "current tasklet" , stackless .getcurrent ().bind , None )
929+ self .assertRaisesRegex (RuntimeError , "current tasklet" , stackless .getcurrent ().bind , None )
930930
931931 def test_unbind_fail_scheduled (self ):
932932 t = stackless .tasklet (self .task )(False )
@@ -938,7 +938,7 @@ def test_unbind_fail_scheduled(self):
938938 self .assertTrue (t .alive )
939939 self .assertIsInstance (t .frame , types .FrameType )
940940
941- self .assertRaisesRegexp (RuntimeError , "scheduled" , t .bind , None )
941+ self .assertRaisesRegex (RuntimeError , "scheduled" , t .bind , None )
942942
943943 def test_unbind_fail_cstate (self ):
944944 t = stackless .tasklet (self .task )(True )
@@ -951,7 +951,7 @@ def test_unbind_fail_cstate(self):
951951 self .assertGreaterEqual (t .nesting_level , 1 )
952952 self .assertIsInstance (t .frame , types .FrameType )
953953
954- self .assertRaisesRegexp (RuntimeError , "C state" , t .bind , None )
954+ self .assertRaisesRegex (RuntimeError , "C state" , t .bind , None )
955955
956956 # remove the tasklet. Must run the finally clause
957957 t = None
@@ -1180,7 +1180,7 @@ def test_switch_blocked(self):
11801180 t = stackless .tasklet (self .blocked_target )()
11811181 t .run ()
11821182 self .assertTrue (t .blocked )
1183- self .assertRaisesRegexp (RuntimeError , "blocked" , t .switch )
1183+ self .assertRaisesRegex (RuntimeError , "blocked" , t .switch )
11841184 self .c .send (None )
11851185 self .assertTrue (self .finished )
11861186
@@ -1195,7 +1195,7 @@ def test_switch_trapped(self):
11951195 t = stackless .tasklet (self .target )()
11961196 self .assertFalse (t .paused )
11971197 with switch_trapped ():
1198- self .assertRaisesRegexp (RuntimeError , "switch_trap" , t .switch )
1198+ self .assertRaisesRegex (RuntimeError , "switch_trap" , t .switch )
11991199 self .assertFalse (t .paused )
12001200 t .switch ()
12011201 self .assertTrue (self .finished )
@@ -1210,7 +1210,7 @@ def test_switch_blocked_trapped(self):
12101210 t .run ()
12111211 self .assertTrue (t .blocked )
12121212 with switch_trapped ():
1213- self .assertRaisesRegexp (RuntimeError , "blocked" , t .switch )
1213+ self .assertRaisesRegex (RuntimeError , "blocked" , t .switch )
12141214 self .assertTrue (t .blocked )
12151215 self .c .send (None )
12161216 self .assertTrue (self .finished )
@@ -1220,7 +1220,7 @@ def test_switch_paused_trapped(self):
12201220 t .bind (args = ())
12211221 self .assertTrue (t .paused )
12221222 with switch_trapped ():
1223- self .assertRaisesRegexp (RuntimeError , "switch_trap" , t .switch )
1223+ self .assertRaisesRegex (RuntimeError , "switch_trap" , t .switch )
12241224 self .assertTrue (t .paused )
12251225 t .switch ()
12261226 self .assertTrue (self .finished )
0 commit comments