This repo is the skeleton for an exploratory, TDD-based course on Data Structures using Python. The series is based on Dave Astels' DBC Deep Dives, and adapted for implementation in, and of, the Python language.
I've done a bit of asking around, and attempted to adopt most commonly followed practices in the world of python testing. Tests are written using the built in unittest framework and run using nose. A few naming conventions might look different, because I've framed them around what I think is the best way to teach the material through TDD (and a bit of BDD).
- You'll need git, for cloning the repo:
- First, double check to see if you already have it:
git --version
- If you don't, visit this website for instructions.
- First, double check to see if you already have it:
- Make sure you have python installed, and check the version: this repo uses 2.x
python --version
will check the version you're using- if you're using python 3.x, and you don't already have a tool like pyenv installed, go ahead and install it. After it's installed, check out the docs for which commands will set up your environment.
-
don't forget [#3 in the installation instructions](https://github.com/yyuu/pyenv#basic-github-checkout. That's important.
-
try:
$> pyenv install 2.7.9 $> pyenv shell 2.7.9
-
- install nose:
pip install nose
- First, clone the repo:
git clone [email protected]:celeen/PythonDataStructures.git
- Then choose the Data Structure you're exploring- take, for example, Lists.
- cd into the tests directory, and run
nosetests list_tests.py
- run
nosetests -v list_tests.py
for verbose output
- run
- confirm it runs, and that everything passes
- Find the related file in the main package, and delete its contents.
- run the tests again; confirm they run and that nothing passes.
- cd into the tests directory, and run
Happy Coding!
Any feedback is welcome in the form of PRs, issues, or emails. This is a work in progress.