Tests: support running benchmark when Blender prints unrelated text
I noticed that sometimes the geometry nodes benchmark would not work if there were some left-over debug prints in the code. The reason it did not work was because the prints were mixed with the test output print. I also tried using explicit flusing and `atexit` for printing the test output, but that didn't solve it. Just printing additional newlines to better separate the test output from other printed output helped though.
This commit is contained in:
parent
3337838b49
commit
006e905957
|
@ -241,7 +241,7 @@ class TestEnvironment:
|
|||
f'args = pickle.loads(base64.b64decode({args}))\n'
|
||||
f'result = {modulename}.{functionname}(args)\n'
|
||||
f'result = base64.b64encode(pickle.dumps(result))\n'
|
||||
f'print("{output_prefix}" + result.decode())\n')
|
||||
f'print("\\n{output_prefix}" + result.decode() + "\\n")\n')
|
||||
|
||||
expr_args = blender_args + ['--python-expr', expression]
|
||||
lines = self.call_blender(expr_args, foreground=foreground)
|
||||
|
|
Loading…
Reference in New Issue