Вопрос

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?

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top