Closed davidrpugh closed 10 years ago
@crisla
I have now added a test_inputs.py
module which tests that the code written in the inputs.py
module is working as expected. To run the test script, open a terminal window/command prompt and type:
$ nosetests -v --with-coverage --cover-package=inputs test_input.py
You may need to install the coverage
tool if it has not already been installed. Just run
$ pip install coverage
from the command line.
When you have successfully run the tests, you will note that the test suite has 100% coverage. This means that I have written tests that validate 100% of all statements in the code.
@crisla
The code above is ready to be merged into the master
branch. When working on collaborative projects, it is considered good practice to never merge ones own code into the master
branch. This practice enforces peer review of code and acts as a quality control mechanism. Just as importantly, peer review insures that there is at least some level of uniform understanding as to how the code in the master
branch works.
To test your understanding of the code, I would encourage you to write some additional test cases and add them to the test_inputs.py
module. Once you feel comfortable with the code, go ahead and merge it into master
.
@crisla
As part of my efforts to refactor the code that I wrote to bring it up to my current standards for "good code" I have opened a placeholder pull request PR to incorporate an
inputs.py
module into the code base.