Cleanup: Consistent setup and teardown in OSL compile test

If multiple tests are added in the future, this could break them.

This issue was introduced in 4f050d82dc.

Pull Request: https://projects.blender.org/blender/blender/pulls/154967
This commit is contained in:
Brecht Van Lommel 2026-02-27 17:15:35 +01:00 • committed by Brecht Van Lommel
parent 3a1ffd512f
commit cb3db815bc

View file

@ -24,8 +24,9 @@ class AbstractOSLCompileTest(unittest.TestCase):
def setUp(self):
self.assertTrue(self.testdir.exists(), "Test dir {0} should exist".format(self.testdir))
def tearDown(self):
self._tempdir.cleanup()
@classmethod
def tearDownClass(cls):
cls._tempdir.cleanup()
class OSLCompileTest(AbstractOSLCompileTest):