Conditions | 4 |
Total Lines | 17 |
Lines | 0 |
Ratio | 0 % |
1 | """ |
||
22 | def testDebug(self): |
||
23 | """ |
||
24 | Runs all test cases in the test/debug directory. |
||
25 | """ |
||
26 | test_file_names = glob.glob(os.path.dirname(os.path.abspath(__file__)) + "/debug/*.sdoc") |
||
27 | |||
28 | for test_file_name in sorted(test_file_names): |
||
29 | with self.subTest(test_file_name=test_file_name): |
||
30 | pre, ext = os.path.splitext(test_file_name) |
||
31 | text_file_name = pre + '.txt' |
||
32 | with open(text_file_name, 'r') as file: |
||
33 | text = file.read() |
||
34 | |||
35 | sdoc = SDoc() |
||
36 | (stdout, sdoc2) = sdoc.test_sdoc1(test_file_name) |
||
37 | |||
38 | self.assertEqual(stdout, text) |
||
39 | |||
42 |