Exercism Python Track
Exercism exercises in Python
Please see the contributing guide
Working on the Exercises
We welcome both improvements to the existing exercises and new exercises. A list of missing exercise can be found here: https://github.com/exercism/python/issues/417#issuecomment-366040062
- We use minimalistic stub files for all exercises (#272).
- We use
unittest(Python Standard Library) and no 3rd-party-framework.
- We use the parameter order
- We use context managers (
with self.assertRaises(\<exception type\>):) for testing for exceptions (#477).
- We use an established utility method to confirm that expected exceptions contain a non-empty message. This method must be included for any test class with an exception-based test case (#1080).
- We use
assertIs(actual, False)rather than
- We use a comment string in the test file to reference the version of the exercise's
canonical-data.jsonthat tests were adapted from (wording can be found in: #784).
All exercises must be compatible with Python versions 2.7 and 3.4 upwards.
To test a single exercise (e.g., with Python 2.7):
python2.7 test/check-exercises.py [exercise-name]
To test all exercises (e.g., with Python 3):
This repo uses flake8 with default settings to enforce the coding standard.
This repo uses
travis-ci in the following configuration: travis.yml
It will automatically check the code style, the problem configuration, and run the unittests with all supported Python versions.
Please write the first line of your commit message in the following style:
exercise-name: Change some things
Please try to follow the The seven rules of a great Git commit message like to capitalize the subject line and use the imperative mood. If there are more details to add, put those into the body of the commit message.
If you're interested, Tim Pope even has an entire blog post on good commit messages.
If you're new to Git, take a look at this short guide.
The Python logo is an unregistered trademark. We are using a derived logo with the permission of the Python Software Foundation.
This repository uses the MIT License.