Templates and Test Suites for Programming Contests and Online interviews.
- Python 3.5 +
- Write main logic at the main function of
src/bin/main.py
- This corresponds to the submission code for the contest.
- Write either test case at
src/test/test_main.py
based on the type of submission.- If the contest site uses stdin/stdout for evaluation, Use
StdInOutTestCase
. - If the contest site uses return value for evaluation, Use
MainRoutineTestCase
.
- If the contest site uses stdin/stdout for evaluation, Use
- Then, execute unit test on project root by the following command.
python -m unittest src.test.test_main.StdInOutTestCase
orpython -m unittest src.test.test_main.MainRoutineTestCase
- Use git stash / unstash when you solve multiple problems at the same time.
- Please feel free to send pull-request to make the template more practical.