diff --git a/tests/testlex.py b/tests/testlex.py index 7f2adad..b98e4f7 100755 --- a/tests/testlex.py +++ b/tests/testlex.py @@ -398,4 +398,5 @@ def test_lex_state_try(self): -unittest.main() +if __name__ == "__main__": + unittest.main() diff --git a/tests/testyacc.py b/tests/testyacc.py index b488bf7..216df40 100644 --- a/tests/testyacc.py +++ b/tests/testyacc.py @@ -400,4 +400,5 @@ def test_yacc_prec1(self): "Precedence rule 'left' defined for unknown symbol '/'\n" )) -unittest.main() +if __name__ == "__main__": + unittest.main()