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 1: Develop Unit Tests for Load Data Module
As a team, you will write four different test cases for your load_data 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 student-test.csv file provided.
STEP 1
1. Read the descriptions of the tests below.
2. Decide who is writing which test.
Test 1: Functions Return a List
In a file named test1.py, write a test function named test_return_list to test that each of the six
functions in the load data module returns a list.
For each function except load_data you need to provide at least 3 test cases covering different
scenarios: 5 functions *3 test/function =15 test cases
For function load_data, you need to provide at least 6 test cases covering different scenarios.
That is 21 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 test_return_list()-> list[int]:
# Complete the function with your test cases # test that student_school_list returns a list (3 different test cases required) # test that student_age_list returns a list (3 different test cases required) # test that student_health_list returns a list (3 different test cases required) # test that student_failures_list returns a list (3 different test cases required) # test that load_data returns a list (6 different test cases required) # test that add_average returns a list (3 different test cases required) # return the a list with the number of tests that passed and the number that failed
cvs file name:student-test.csv
Task 1 : Develop Unit Tests for Load Data Module

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!