https://github.com/douglascdev/cookiecutter-competitive-programming
A cookiecutter template for competitive programming with mocked input and output to facilitate testing/TDD.
https://github.com/douglascdev/cookiecutter-competitive-programming
Last synced: 23 days ago
JSON representation
A cookiecutter template for competitive programming with mocked input and output to facilitate testing/TDD.
- Host: GitHub
- URL: https://github.com/douglascdev/cookiecutter-competitive-programming
- Owner: douglascdev
- License: mit
- Created: 2021-04-14T17:34:31.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2021-05-15T18:13:32.000Z (about 5 years ago)
- Last Synced: 2025-11-20T16:14:20.991Z (7 months ago)
- Language: Python
- Homepage:
- Size: 7.81 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Cookiecutter for Python Competitive Programming
A cookiecutter template for competitive programming with mocked input and output to facilitate testing/TDD.
The advantage of this approach is that you can easily create methods to test inputs and outputs replacing values that are entered with stdin and stdout by entering the values in a string, and then just paste your solution on the contest directly.
The running time is also printed for each test by default.
## Usage
Install cookiecutter:
```
pip install cookiecutter
```
Create a project using the template:
```
cookiecutter https://github.com/douglascdev/cookiecutter-competitive-programming
```
You'll be asked for the project name, which will be created at the current folder.
After that, you can implement the tests to make sure your code will work on the file ```cp_problem_tests.py```, and your solution at ```cp_problem.py```.
Further explanations are on the files.