(Thirty) pytest compatible unittest problem

Question:
conftest can not seem to execute inside unittest framework will not find the error function inside the fixture contest marks

My current solution is: completely abandoned unittest

 

 

Logically speaking python unittest is built test libraries, pytest be used to perform unittest, which can perform a test environment at the same time pytest and unittest

 

If you write too many test cases unitest how to do?

Pytest while writing a new test case, unittest while maintaining test cases, test cases gradually transition to pytest unittest test case (refactor the code will always encounter many problems, be patient, Big Brother)

 

 

Currently the official website statement is to run unittest test cases, test cases run pytest, if you run the test case pytest first, then run unittest being given use case

 

 

Still need deeper skill to study this question, welcome message chiefs to discuss this issue

Guess you like

Origin www.cnblogs.com/wx921308494/p/11966786.html