@@ -12,10 +12,8 @@ def setUpClass(self):
1212 def tearDownClass (cls ):
1313 print ("\n Tearing down comment_spell_check tests" )
1414
15- def test_comment_spell_check (self ):
16- print ("\n Command_spell_check simple test" )
17- cwd = os .getcwd ()
18- print (cwd )
15+ def test_basic (self ):
16+ print ("\n Command_spell_check: Basic Test" )
1917 runresult = subprocess .run (
2018 [
2119 "python" ,
@@ -26,15 +24,16 @@ def test_comment_spell_check(self):
2624 "--prefix" ,
2725 "myprefix" ,
2826 "tests/example.h" ,
29- ]
27+ ],
28+ stdout = subprocess .PIPE ,
3029 )
31- print ("Return code:" , runresult .returncode )
3230 if runresult .returncode :
33- self .fail ("Simple test: comment_spell_check.py process returned bad code" )
31+ self .fail ("\n Basic Test: FAIL" )
32+ output_string = str (runresult .stdout )
33+ print ("\n Test output:" , output_string )
3434
35- print ("\n Comment_spell_check test on itself" )
36- cwd = os .getcwd ()
37- print (cwd )
35+ def test_codebase (self ):
36+ print ("\n Comment_spell_check: Code Base Test" )
3837 runresult = subprocess .run (
3938 [
4039 "python" ,
@@ -47,15 +46,16 @@ def test_comment_spell_check(self):
4746 "--suffix" ,
4847 ".md" ,
4948 "." ,
50- ]
49+ ],
50+ stdout = subprocess .PIPE ,
5151 )
52- print ("Return code:" , runresult .returncode )
5352 if runresult .returncode :
54- self .fail (
55- "Self code test: comment_spell_check.py process returned bad code"
56- )
53+ self .fail (" \n Code Base Test: FAIL" )
54+ output_string = str ( runresult . stdout )
55+ print ( " \n Test output:" , output_string )
5756
58- print ("\n Test version" )
57+ def test_version (self ):
58+ print ("\n Comment_spell_check: Version Test" )
5959 runresult = subprocess .run (
6060 [
6161 "python" ,
@@ -64,12 +64,8 @@ def test_comment_spell_check(self):
6464 ],
6565 stdout = subprocess .PIPE ,
6666 )
67- print ("Return code:" , runresult .returncode )
68- print ("Version: " , runresult .stdout )
6967 version_string = str (runresult .stdout )
7068 if runresult .returncode :
71- self .fail (
72- "Self code test: comment_spell_check.py process returned bad code"
73- )
69+ self .fail ("Version Test: FAIL" )
7470 if "unknown" in version_string :
75- self .fail ("Self code test : version string contains 'unknown'" )
71+ self .fail ("Version Test : version string contains 'unknown'" )
0 commit comments