@@ -285,7 +285,7 @@ def t():
285285 s .throw (TaskletExit )
286286 # the tasklet should be dead
287287 stackless .run ()
288- self .assertRaisesRegexp (RuntimeError , "dead" , s .run )
288+ self .assertRaisesRegex (RuntimeError , "dead" , s .run )
289289
290290 def test_dead (self ):
291291 c = stackless .channel ()
@@ -684,7 +684,7 @@ def test_handler(self):
684684 def test_broken_handler (self ):
685685 stackless .tasklet (self .func )(self .broken_handler )
686686 with self .handler_ctx (self .broken_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
@@ -872,13 +872,13 @@ def test_bind(self):
872872
873873 self .assertFalse (t .alive )
874874 self .assertIsNone (t .frame )
875- self .assertEquals (t .nesting_level , 0 )
875+ self .assertEqual (t .nesting_level , 0 )
876876
877877 t .bind (None ) # must not change the tasklet
878878
879879 self .assertFalse (t .alive )
880880 self .assertIsNone (t .frame )
881- self .assertEquals (t .nesting_level , 0 )
881+ self .assertEqual (t .nesting_level , 0 )
882882
883883 t .bind (self .task )
884884 t .setup (False )
@@ -901,7 +901,7 @@ def test_bind(self):
901901 def test_bind_fail_not_callable (self ):
902902 class C (object ):
903903 pass
904- self .assertRaisesRegexp (TypeError , "callable" , stackless .current .bind , C ())
904+ self .assertRaisesRegex (TypeError , "callable" , stackless .current .bind , C ())
905905
906906 def test_unbind_ok (self ):
907907 if not stackless .enable_softswitch (None ):
@@ -927,7 +927,7 @@ def test_unbind_ok(self):
927927 self .assertEqual (self .finally_run_count , 0 )
928928
929929 def test_unbind_fail_current (self ):
930- self .assertRaisesRegexp (RuntimeError , "current tasklet" , stackless .current .bind , None )
930+ self .assertRaisesRegex (RuntimeError , "current tasklet" , stackless .current .bind , None )
931931
932932 def test_unbind_fail_scheduled (self ):
933933 t = stackless .tasklet (self .task )(False )
@@ -939,7 +939,7 @@ def test_unbind_fail_scheduled(self):
939939 self .assertTrue (t .alive )
940940 self .assertIsInstance (t .frame , types .FrameType )
941941
942- self .assertRaisesRegexp (RuntimeError , "scheduled" , t .bind , None )
942+ self .assertRaisesRegex (RuntimeError , "scheduled" , t .bind , None )
943943
944944 def test_unbind_fail_cstate (self ):
945945 t = stackless .tasklet (self .task )(True )
@@ -952,7 +952,7 @@ def test_unbind_fail_cstate(self):
952952 self .assertGreaterEqual (t .nesting_level , 1 )
953953 self .assertIsInstance (t .frame , types .FrameType )
954954
955- self .assertRaisesRegexp (RuntimeError , "C state" , t .bind , None )
955+ self .assertRaisesRegex (RuntimeError , "C state" , t .bind , None )
956956
957957 # remove the tasklet. Must run the finally clause
958958 t = None
@@ -1181,7 +1181,7 @@ def test_switch_blocked(self):
11811181 t = stackless .tasklet (self .blocked_target )()
11821182 t .run ()
11831183 self .assertTrue (t .blocked )
1184- self .assertRaisesRegexp (RuntimeError , "blocked" , t .switch )
1184+ self .assertRaisesRegex (RuntimeError , "blocked" , t .switch )
11851185 self .c .send (None )
11861186 self .assertTrue (self .finished )
11871187
@@ -1196,7 +1196,7 @@ def test_switch_trapped(self):
11961196 t = stackless .tasklet (self .target )()
11971197 self .assertFalse (t .paused )
11981198 with switch_trapped ():
1199- self .assertRaisesRegexp (RuntimeError , "switch_trap" , t .switch )
1199+ self .assertRaisesRegex (RuntimeError , "switch_trap" , t .switch )
12001200 self .assertFalse (t .paused )
12011201 t .switch ()
12021202 self .assertTrue (self .finished )
@@ -1211,7 +1211,7 @@ def test_switch_blocked_trapped(self):
12111211 t .run ()
12121212 self .assertTrue (t .blocked )
12131213 with switch_trapped ():
1214- self .assertRaisesRegexp (RuntimeError , "blocked" , t .switch )
1214+ self .assertRaisesRegex (RuntimeError , "blocked" , t .switch )
12151215 self .assertTrue (t .blocked )
12161216 self .c .send (None )
12171217 self .assertTrue (self .finished )
@@ -1221,7 +1221,7 @@ def test_switch_paused_trapped(self):
12211221 t .bind (args = ())
12221222 self .assertTrue (t .paused )
12231223 with switch_trapped ():
1224- self .assertRaisesRegexp (RuntimeError , "switch_trap" , t .switch )
1224+ self .assertRaisesRegex (RuntimeError , "switch_trap" , t .switch )
12251225 self .assertTrue (t .paused )
12261226 t .switch ()
12271227 self .assertTrue (self .finished )
0 commit comments