Question: Task 1 : Develop Unit Tests for Load Data Module As a team, you will write four different test cases for your load _ data
Task : Develop Unit Tests for Load Data Module
As a team, you will write four different test cases for your loaddata module. Remember to use
automated testing, as you learned during the lectures.
Docstring and type annotations are not required for this lab.
For your tests, use the studenttest.csv file provided.
STEP
Read the descriptions of the tests below.
Decide who is writing which test.
Test : Functions Return a List
In a file named testpy write a test function named testreturnlist to test that each of the six
functions in the load data module returns a list.
For each function except loaddata you need to provide at least test cases covering different
scenarios: functions testfunction test cases
For function loaddata, you need to provide at least test cases covering different scenarios.
That is test cases in total.
Hint: For this test, you need to check that the return type of the function is a list. You may want to use the Python function isinstance Look online at how to use this function
def testreturnlist listint:
# Complete the function with your test cases # test that studentschoollist returns a list different test cases required # test that studentagelist returns a list different test cases required # test that studenthealthlist returns a list different test cases required # test that studentfailureslist returns a list different test cases required # test that loaddata returns a list different test cases required # test that addaverage returns a list different test cases required # return the a list with the number of tests that passed and the number that failed
cvs file name:studenttest.csv
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
