Closed Lakshmikanth2001 closed 2 years ago
Sir, can you provide your views about this
Hi @Lakshmikanth2001!
Hmm.... I'm struggling to see the purpose of nesting test functions in this paradigm. Would you be able to educate me on the benefit and additional reasoning? I do think that it's valuable to exercise all "corner-cases" of the functionality of the library, but I don't know that I agree with "ramping up" functional tests. I'd rather test the "happy-path" and the corner cases.
That said, I'm interested to hear what the benefit of this pattern is! Perhaps I'm overlooking something valuable!
The Advantages are people can contribute to test cases. First, they will review test_0
to test_{i}
so the complexity of each test case improves they can properly verify where doest their test case fit, or whether the test is already covered by existing methods
Sir Any update regarding this issue
The Advantages are people can contribute to test cases. First, they will review
test_0
totest_{i}
so the complexity of each test case improves they can properly verify where doest their test case fit, or whether the test is already covered by existing methods
While that's true, the "pythonic" way to write tests for pytest
is to write descriptive names to tell what the purpose of the test is. More test-functions can be used for the same core function, and simply be altered to more accurately describe the purpose of the test.
test_my_feature_function
test_my_feature_with_input_zero
test_my_feature_with_some_other_value
We need to make TestSuiets
to do that, I have to learn how to implement them
Can we organized all our test functions in this format
Where all test function contain at least two test case with increasing level of complexity