Grouping multiple test cases in a class
In this section, we will dive deep into grouping the test cases in a class.
Make sure to prefix your class with Test otherwise the class will be skipped.
Also, remember that the method names within the class should follow the pytest standards as test_% or %_test
# content of 3_group_tests.py
class TestClass:
def test_method_one(self):
x = "group"
assert "r" in x
def test_method_two(self):
x = "hello"
assert hasattr(x, "check")