Search the courses, subjects, tracks, games and features, or jump straight to a page.
2 cards from this section. Quick, good the night before a test.
What function do you use to create a simple test case in pytest?
Think about the naming convention for test functions.
Explain what a fixture is in the context of pytest.
It's used to prepare the environment for the tests.
What is the primary purpose of pytest?
Think about the main functionality of pytest.
True or False: Fixtures are used to set up preconditions for tests in pytest.
Are fixtures related to preparing test environments?
Write a pytest test case that uses a fixture for setting up a mock API response and demonstrate how it can be reused in multiple tests.
Think about how you would write a function that returns a predefined response.
Design a suite of tests using parameterized testing for a validation function that checks email formats, and include edge cases.
Consider common formats and errors in email addresses.
4 more questions in this section. Enroll free to practise them all.
Enroll free