Question: Using python, I need help with creating a test script for this problem. It Is a 100 level computer science class so please keep it

Using python, I need help with creating a test script for this problem. It Is a 100 level computer science class so please keep it simple. I have been using pycharm for code. Docstring would be appreciated. tes_statistics.py is gonna be in a google drive link

Using python, I need help with creating a test script for thisproblem. It Is a 100 level computer science class so please keep

On the course Moodle, you'll find the following file(s): . Statistics. py, which is an ADT covered in class and in the readings. For your convenience, we re- moved some of the calculations and operations (e.g., var() and sampvar (). that were not relevant to this exercise, which would have made testing too onerous. . test_statistics. py, which is a test-script for the Statistics ADT. This test script currently only im- plements a few basic tests. In this question you will complete the given test script. Study the test script, observing that each operation gets tested. Because each object is different we cannot check if an object is created correctly; instead, we will check if the initial values are correct. Likewise, methods like add () can't be tested directly, because the object's attributes are private: all we can really do is check to see if the add() method has the right effect in combination with count () and mean (). Design new test cases for the operations, considering: . White-box test cases. . Black-box test cases. . Boundary test cases, and test case equivalence classes. . Test coverage, and degrees of testing. . Unit vs. Integration testing. Running your test script on the given ADT should report no errors, and should display nothing except the message '*** Test script completed ***'. Note: You will have to decide how many tests to include. This is part of the exercise. What to Hand In . A Python script named a4q2_testing . py containing your test script. Be sure to include your name. NSID, student number, course number and section at the top of all docu- ments. Evaluation . 5 marks: Your test cases for Statistics. add () have good coverage. . 5 marks: Your test cases for Statistics. mean () have good coverage.class Statistics (object) : CN def _init_(self) : 4 self. _count = 0 # how many data values seen so far self . _avg = 0 # the running average so far def add (self value): 10 11 self. _count += 1 12 k = self . _count # convenience 13 diff = value - self . _avg # convenience 14 self . _avg += diff / k 15 16 17 def mean (self) : 18 19 return self. _avg 20 21 def count (self) : 22 23 return self.. count

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!