Giter VIP home page Giter VIP logo

tdd-fibonacci-example's Introduction

TDD step-by-step example

Adapted from Test-Driven Development By Example, Kent Beck.

Robert Haines, University of Manchester, 2014, 2015

Working through the steps

Using binder to run the Jupyter Notebook

Binder

Click on the above badge, or go to https://mybinder.org/v2/gh/hainesr/tdd-fibonacci-example/master.

Click on walkthrough-notebook.ipynb once the environment has loaded.

Please see the Jupyter documentation for more information.

Using Docker to run the Jupyter Notebook

There is a Docker image you can use so that you don't need to install Jupyter on your own machine. Simply install Docker and run:

docker run -d -p 8888:8888 --name tdd hainesr/tdd-fibonacci-example

This will download the image, if required, and then start the Jupyter notebook server on port 8888. Open your Web browser at http://localhost:8888 and then click on the walkthrough-notebook.ipynb link to get started.

When you have finished, shut down the image with:

docker stop tdd
docker rm tdd

Alternatively you can load up walkthrough-notebook.ipynb into your favourite IPython/Jupyter server.

Please see the Jupyter documentation for more information.

Using your local python setup

See walkthrough-slides.pdf or walkthough-script.md in this directory for the individual steps.

In this repository each step is tagged so you can move through the example by checking each step out as you get to it. For example:

git checkout step-1

Tags are named step-n, where 1 <= n <= 8.

Running these examples

From a terminal

  1. Add the 'src' directory to the python library search path:

    export PYTHONPATH=`pwd`/src
  2. Run the tests:

    python test/test_fibonacci.py

Within Eclipse

  1. Open up the project properties and add the 'src' directory to its PYTHONPATH. How you do this will depend on which plugin you are using for python development within Eclipse.

  2. Right-click on 'test_fibonacci.py' in the 'test' directory and select 'Run As -> Python Unit Test'. Again this may differ depending on which plugin you are using.

Licence

BSD. See LICENCE for details.

tdd-fibonacci-example's People

Contributors

hainesr avatar

Stargazers

Nic avatar swsmile avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.