Merge branch 'master' into blender2.8

This commit is contained in:
2018-03-02 16:42:27 +01:00
10 changed files with 197 additions and 67 deletions

View File

@@ -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 = (