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 does parameterization allow you to do in tests?
Think about reducing duplication in your test cases.
Which decorator is used in pytest for parameterized tests?
It starts with '@pytest' and is followed by something related to the parameters.
What is the primary benefit of using parameterized tests?
Think about the purpose of testing.
True or False: Parameterized tests can only test for positive integers.
Consider what types of inputs you can provide.
Create a parameterized test for a function that calculates the factorial of a number. Include edge cases like zero and negative inputs.
Think about how factorial is defined for zero and handling incorrect inputs.
Design a parameterized test for a function that checks if a string is a palindrome. Include both valid and invalid cases.
Consider both simple and complex examples of palindromes.
5 more questions in this section. Enroll free to practise them all.
Enroll free