Skip to content
This repository was archived by the owner on Dec 21, 2025. It is now read-only.

Conversation

@echoix
Copy link

@echoix echoix commented Oct 6, 2024

This PR simply adds a if __name__ == "__main__": guard to the unittest.main() call at the end of the two test files, tests/testlex.py and tests/testyacc.py.

This change happens to follow the pattern of the basic example in unittest's docs: https://docs.python.org/3/library/unittest.html#basic-example

With this, this allows to run the test suite normally with the included makefile, as well as with pytest, that can run unittest tests without any changes.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant