Giter Site home page Giter Site logo

fastwriter / be-fullstack-tdd Goto Github PK

View Code? Open in Web Editor NEW

This project forked from an4ik/python-tdd

0.0 1.0 0.0 13 KB

Task to show student principles of the Test Driven Development for https://an4ik.gitbooks.io/be-fullstack/content/ tutorial

Python 100.00%

be-fullstack-tdd's Introduction

be-fullstack-TDD

Test Driven Development (TDD) - is a software development process that relies on the repetition of a very short development cycle: requirements are turned into very specific test cases, then the software is improved to pass the new tests, only.

PART-1. FIND_MIN

  1. Look at the file find_min.py.

  2. To follow TDD the first thing we have to do is write tests for given functions. Fortunately for you I've already created tests. (look at the file tests/find_min_test.py)

  3. Run tests:

     python3 -m unittest tests/find_min_test.py
    

    You will see that it ran 7 tests and all of them FAILED (failures=7)

  4. Now, complete that functions in find_min.py

  5. After running tests all of them should be passed.

  6. Compare your answer with mine located in answers/find_min.py

  7. Commit and push your changes


PART-2. FIND_MAX

  1. Look at the file find_max.py. You will find that there are empty functions.

  2. Run tests for find_max functions:

     python3 -m unittest tests/find_max_test.py
    

    You will see that it Ran 7 tests without failures, because there is no body for test functions in test/find_max_test.py

  3. You have to do:

    1. Write documentation for function get_max inside find_max.py

    2. Write test for get_max function inside tests/find_max.py

    3. Run tests and see that one test failed (test_get_max)

    4. Implement get_max function

    5. Run tests, all of the tests shoud be passed.

    6. Do the same for every function one by one

  4. Commit and push your changes

  5. Smile cause you've done good job.

be-fullstack-tdd's People

Contributors

an4ik avatar fastwriter avatar sansyzbaev avatar

Watchers

 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.