Skip to content
/ calc Public
forked from pycabook/calc

A small project used to introduce TDD

License

Notifications You must be signed in to change notification settings

adasilva/calc

 
 

Repository files navigation

Calc

Documentation Status Updates

A small project used to introduce TDD

Setup

Please do the following steps to install the dependencies and make sure you are ready to go:

  1. Clone this repository
  2. Install requirements

pip install -r requirements/dev.txt

  1. Check your setup

Check that pytest is installed properly:

py.test -svv

This command should show a message about the number of tests passed (there should be no failures).

  1. Fetch tags from the remote

git fetch --all --tags --prune

  1. (Optional) Set up branches

During the workshop, I will ask you to checkout different tagged commits as starting points for different exercises.

The command for checking out a tag is:

git checkout tags/<tag-name> -b <branch-name>

The following are the tags used for the exercises & solutions:

  • step-1-adding-two-numbers
  • step-5-multiply-two-numbers
  • step-6-refactoring
  • step-8-multiply-by-zero
  • meteoritestats-class-added

In case we have time for it, the bonus mocking exercise is from a different repository:

git clone https://github.com/pycabook/fileinfo.git

Tags for the bonus exercise & solution:

  • patch-with-context-manager
  • patch-with-function-decorator

Credits

This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.

About

A small project used to introduce TDD

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Languages

  • Python 72.2%
  • Makefile 27.8%