Skip to content

Commit 9e8fcca

Browse files
committed
Reformat test file
1 parent 313d292 commit 9e8fcca

1 file changed

Lines changed: 9 additions & 12 deletions

File tree

tests/test_c_parser.py

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2956,6 +2956,15 @@ def test_pragmacomp_or_statement(self):
29562956
)
29572957

29582958

2959+
class TestUnmatchedRbrace(unittest.TestCase):
2960+
"""Regression for #603: unmatched '}' raises ParseError, not AssertionError."""
2961+
2962+
def test_unmatched_rbrace_raises_parse_error(self):
2963+
parser = c_parser.CParser()
2964+
with self.assertRaises(ParseError):
2965+
parser.parse("}", filename="test.c")
2966+
2967+
29592968
class TestCParser_whole_code(TestCParser_base):
29602969
"""Testing of parsing whole chunks of code.
29612970
@@ -3778,16 +3787,4 @@ def test_case_empty_statement(self):
37783787

37793788

37803789
if __name__ == "__main__":
3781-
# ~ suite = unittest.TestLoader().loadTestsFromNames(
3782-
# ~ ['test_c_parser.TestCParser_fundamentals.test_typedef'])
3783-
3784-
# ~ unittest.TextTestRunner(verbosity=2).run(suite)
37853790
unittest.main()
3786-
3787-
class TestUnmatchedRbrace(unittest.TestCase):
3788-
"""Regression for #603: unmatched '}' raises ParseError, not AssertionError."""
3789-
3790-
def test_unmatched_rbrace_raises_parse_error(self):
3791-
parser = c_parser.CParser()
3792-
with self.assertRaises(ParseError):
3793-
parser.parse("}", filename="test.c")

0 commit comments

Comments
 (0)