Read the file
When you want to read a table in the CSV format in Python, you might want to use pandas.read_csv()
.
You will implement two integration tests with pytest
to check the result of pandas.read_csv()
. Then, you will run the tests with the CLI command.
This exercise is part of the course
Introduction to Testing in Python
Exercise instructions
- Implement a test to verify the type of the object returned from
get_df
equalspd.DataFrame
. - Implement a test to check that
get_df
has more than0
rows. - Run the test with the CLI command.
Hands-on interactive exercise
Turn theory into action with one of our interactive exercises
