Search the courses, subjects, tracks, games and features, or jump straight to a page.
3 cards from this section. Quick, good the night before a test.
What is the primary purpose of pytest?
Think about what makes pytest different from unittest.
How do you create a basic test function in pytest?
Look at the structure of the provided example.
What is the key advantage of using pytest over unittest?
Think about the syntax and structure differences.
True or False: You can parameterize tests in pytest using decorators.
Remember the examples given in class.
Write a pytest script that tests a function named 'multiply' which takes two numbers and returns their product. Use fixtures to prepare the numbers.
Look at how we wrote the add and fixture examples in class.
Create a set of tests using pytest with the addition of plugins to run tests in parallel and generate a coverage report. Explain how this improves your testing process.
Recall the benefits we discussed about plugins and parallelization.
5 more questions in this section. Enroll free to practise them all.
Enroll free