Skip to content

gregdetre/unit-testing-pres

Repository files navigation

How to make the most of unit testing

Presentation by Greg Detre on unit testing in Python at Tampa Bay Python meetup on 13th October 2015.

see:

Join the Google Hangout

http://bit.ly/1GELH73 (requires Google Hangouts app & Google account)

Setup

cd ~/PATH/TO/DEV/
git clone git@github.com:gregdetre/unit-testing-pres.git
cd unit-testing-pres
virtualenv venv
source venv/bin/activate
pip install -r requirements.txt

Or, if you have trouble, just download the tarball.

Running the tests

Create test_template0.py:

def test_blah():
    assert True

Then run:

$ nose2 test_template0

Or if you weren't able to install nose2, you can use the more verbose unittest standard library in test_template2.py:

$ python test_template2.py

Next steps

Have a look in test_template1.py and test_template2.py for further examples and usage instructions.

About

Presentation on unit testing in Python

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages