https://github.com/bast/python-tdd-exercises
Python exercises in TDD style.
https://github.com/bast/python-tdd-exercises
Last synced: 10 months ago
JSON representation
Python exercises in TDD style.
- Host: GitHub
- URL: https://github.com/bast/python-tdd-exercises
- Owner: bast
- Created: 2015-11-22T20:50:48.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2015-12-02T22:31:05.000Z (over 10 years ago)
- Last Synced: 2025-04-28T13:11:28.272Z (about 1 year ago)
- Language: Python
- Size: 111 KB
- Stars: 9
- Watchers: 3
- Forks: 68
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Python exercises in TDD style
## Make these badges green
[](https://travis-ci.org/bast/python-tdd-exercises/builds)
[](https://coveralls.io/r/bast/python-tdd-exercises?branch=master)
After you fork, edit this `README.md` and rename "bast" to your GitHub username
or namespace to make the badges point to your fork.
## Inspirations
- [Python Koans](https://github.com/gregmalcolm/python_koans)
- [46 Simple Python Exercises](http://www.ling.gu.se/~lager/python_exercises.html)
- [Programming Python for Bioinformatics](http://homepages.stca.herts.ac.uk/~comqdp1/BioInf/)
## Goal
- Fork the project.
- Login to [Travis CI](https://travis-ci.org) with your GitHub account and activate this repo for testing.
- Login to [Coveralls](https://coveralls.io) with your GitHub account and activate this repo for code coverage analysis.
- Implement missing functions to make the unit tests pass (run tests either locally or let Travis run them for you each time you push changes).
- Increase the test coverage to 100% by making [all lines](https://coveralls.io/r/bast/python-tdd-exercises?branch=master) green.
## How to run tests locally (Linux or Mac OS X)
First clone the project. Locally running the unit testing
requires either [pytest](http://pytest.org)
or [nose](https://nose.readthedocs.org).
Then you can run the tests with:
```
$ py.test -vv exercises.py
```
You can run a single test case like this:
```
$ py.test -vv exercises.py -k test_character_statistics
```
Or alternatively with [nose](https://nose.readthedocs.org):
```
$ nosetests exercises.py
```