Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2018-03-02 18:42:27 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2018-03-02 18:42:27 +0300
commitc327cf489c4d145407786552e4d9027295754985 (patch)
tree9d1cc902a67988fe82d710d922d16794369c9615 /tests
parentf9f559a05fc16e66031210e62bd7bc51d26208a3 (diff)
parentf76d49ed9504612cc5ba3956b53f920f7c93bd20 (diff)
Merge branch 'master' into blender2.8
Diffstat (limited to 'tests')
-rwxr-xr-xtests/python/modules/test_utils.py12
1 files changed, 7 insertions, 5 deletions
diff --git a/tests/python/modules/test_utils.py b/tests/python/modules/test_utils.py
index 489f36c913f..6ca498d8cdf 100755
--- a/tests/python/modules/test_utils.py
+++ b/tests/python/modules/test_utils.py
@@ -58,11 +58,10 @@ def with_tempdir(wrapped):
class AbstractBlenderRunnerTest(unittest.TestCase):
"""Base class for all test suites which needs to run Blender"""
- @classmethod
- def setUpClass(cls):
- global args
- cls.blender = args.blender
- cls.testdir = pathlib.Path(args.testdir)
+ # Set in a subclass
+ blender: pathlib.Path = None
+ testdir: pathlib.Path = None
+
def run_blender(self, filepath: str, python_script: str, timeout: int=300) -> str:
"""Runs Blender by opening a blendfile and executing a script.
@@ -73,6 +72,9 @@ class AbstractBlenderRunnerTest(unittest.TestCase):
:param timeout: in seconds
"""
+ assert self.blender, "Path to Blender binary is to be set in setUpClass()"
+ assert self.testdir, "Path to tests binary is to be set in setUpClass()"
+
blendfile = self.testdir / filepath
command = (