1- #!/usr/bin/env python
2- import os , unittest
3- from fn_helper import strarray_setup , compare_output
1+ import unittest
2+ from test .functional .fn_helper import compare_output , strarray_setup
43
54
65class TestSkip (unittest .TestCase ):
7- @unittest .skip ("FIXME: figure out why this doesn't work" )
86 def test_skip (self ):
9-
107 # See that we can skip without parameter. (Same as 'skip 1'.)
11- cmds = [' skip' , ' continue' ]
8+ cmds = [" skip" , " continue" ]
129 d = strarray_setup (cmds )
1310 d .core .start ()
1411 ##############################
@@ -17,29 +14,24 @@ def test_skip(self):
1714 y = 7 # NOQA
1815 ##############################
1916 d .core .stop ()
20- out = ['-- x = 4' , # x = 4 is shown in prompt, but not *run*.
21- '-- x = 5' ]
22- compare_output (self , out , d , cmds )
17+ out = ["-- x = 4" , "-- x = 5" ] # x = 4 is shown in prompt, but not *run*.
18+ compare_output (self , out , d )
2319 self .assertEqual (5 , x ) # Make sure lines were skipped.
2420
2521 # See that we can skip with a count value
26- print ("skipping second skip test" )
27- return
28- cmds = ['skip 2' , 'continue' ]
22+ cmds = ["skip 2" , "continue" ]
2923 d = strarray_setup (cmds )
3024 d .core .start ()
3125 ##############################
3226 x = 10
3327 x = 9
3428 z = 7 # NOQA
3529 ##############################
36- d .core .stop (options = {'remove' : True })
37- out = ['-- x = 10' , # x = 10 is shown in prompt, but not run.
38- '-- z = 7' ]
39- compare_output (self , out , d , cmds )
30+ d .core .stop (options = {"remove" : True })
31+ out = [
32+ "-- x = 10" ,
33+ "-- z = 7 # NOQA" ,
34+ ] # x = 10 is shown in prompt, but not run.
35+ compare_output (self , out , d )
4036 self .assertEqual (5 , x ) # Make sure x = 10, 9 were skipped.
4137 return
42- pass
43-
44- if __name__ == '__main__' :
45- unittest .main ()
0 commit comments