Search the courses, subjects, tracks, games and features, or jump straight to a page.
4 cards from this section. Quick, good the night before a test.
What is the purpose of pytest?
Think of the advantages over traditional testing frameworks.
How do you define a test function in pytest?
Remember the naming convention?
What streamlining feature does pytest offer compared to unittest?
Think about how models work in unittest versus pytest.
True or False: You can write functions as tests in pytest without needing to define a class.
Consider how you would normally structure tests in other frameworks.
Create a pytest test suite that includes multiple tests for a calculator module with functions like add, subtract, multiply, and divide. Use fixtures for setup and parameterized tests for inputs.
Think about how you would organize your functions and use `@pytest.mark.parametrize` for different inputs.
Research a pytest plugin of your choice. Write a summary describing its functionalities and how it can improve the testing workflow.
Look for plugins that enhance output reports or facilitate test execution.
5 more questions in this section. Enroll free to practise them all.
Enroll free