问题描述:

Im using PyUnit to write unit tests for my code. The setup method is called everytime before any test is run.

Is there a way i can define a method that will be run just once at the beginning before any tests are run ?

Please Help

Thank You

网友答案:

You can use setUpClass or setUpModule in Python 2.7 and 3.2.

网友答案:

How about using the constructor of your test class?

相关阅读:
Top