Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
PyUnitを使用して、コードの単体テストを記述しています。セットアップメソッドは、テストが実行される前に毎回呼び出されます。テストを実行する前に、最初に1回だけ実行されるメソッドを定義する方法はありますか?
助けてくださいありがとう
Python2.7および3.2ではsetUpClassまたはsetUpModuleを使用できます。
テストクラスのコンストラクターを使用してみませんか?