Unit Testing ISTA 350 Hw9,

Introduction.  This homework will get your feet wet with writing your own unit tests.  It is a good thing to be able to put on a résumé that you have created unit tests.  Instructions.  Create a module named hw9_test.py.  Download the hw9.py and main.py modules from D2L.  hw9.py contains five implemented functions.  You must write unit tests to test these functions.  The provided file should pass your tests.  Any code that doesn't do exactly what these functions do should fail.  Your tests should make sure the code does what it's supposed to, returns what it's supposed to, doesn't change anything it's not supposed to change, and raises any errors it's supposed to.  You don't have to make sure any error messages are correct.  When you are confident that you have created bulletproof tests, cut and past the code from main.py into your module.  The correct code should now give a correctness score of 50. We will be testing your test file with broken code.  Everytime a function passes, you have failed in your mission to create a bulletproof test.  Hence, the backwards grading scheme.  Implement your tests and upload your module to the D2L dropbox.  
Testing.  No testing module will be provided for this assignment (of course not, you are writing it).  Documentation.  Your module must contain a header docstring containing your name, your section leader’s name, the date, ISTA 350 Hw9, and a brief summary of the module.  Each function must contain a docstring.  Each function docstring should include a description of the function’s purpose.  Grading.  IMPORTANT: do not forget to paste the code for main into your module.  You will receive 0 if you forget.  On this assignment, you start with 50 points.  Each test that successfully catches the errors in the broken code we will use to test your assignment will earn you 10 additional points.  Collaboration.  It is important that you largely do this assignment on your own.  It is no good to have something on a résumé if you cannot answer any questions about it.  Resources. https://docs.python.org/3.3/library/unittest.html#module-unittest   
Powered by