jeudi 20 août 2015

Python unittests, statement before test cases

Imagine I have tests like that:

import unittest

class MyTests(unittest.TestCase):

  print("Starting")

  def test_first(self):
    .....

Is the print statement guaranteed to be executed before test_first() and the rest? From what I've seen it does get executed first, but are there any edge cases?

Aucun commentaire:

Enregistrer un commentaire