Skip to content

Commit 2cff538

Browse files
committed
Fix registering and unregistering for TestCases with multiple tests
Signed-off-by: Squareys <Squareys@googlemail.com>
1 parent 3d44b2c commit 2cff538

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

tests/TestUtils.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,17 @@ class OgexExporterTest(unittest.TestCase):
1111

1212
no_delete = False
1313

14-
def setUp(self):
14+
@classmethod
15+
def setUpClass(self):
1516
io_scene_ogex.register()
1617

18+
@classmethod
19+
def tearDownClass(cls):
20+
io_scene_ogex.unregister()
21+
1722
def tearDown(self):
1823
if os.path.isfile(self.filename) and not self.no_delete:
1924
os.remove(self.filename)
20-
io_scene_ogex.unregister()
2125

2226
def readContents(self, filename):
2327
"""

0 commit comments

Comments
 (0)