нужна помощь, я пытаюсь наследовать тестовые случаи в родительском классе, передавая параметры из дочернего класса.
Все работает отлично, но когда я пытаюсь использовать в родительском классе @ pytest.mark.parametrize () все не удалось с
TypeError: объект 'NoneType' не вызывается
Пример: child_test.py
class ChildTest(Parent):
arg = TestObj # < -- class type
def test_child_first_case(self):
print('Child first case')
parent_test.py
class Parent:
arg: type = None
def test_print(self):
print(self.arg().obj())
@pytest.mark.parametrize("test_case_name, data, expected_result",
Generators.ddt(arg().obj))
def test_ddt(self, test_case_name, payload, expected_status_code):
print(f'{test_case_name} {data} {expected_result}')
Спасибо за помощь!