[Bf-blender-cvs] [7c253995765] blender-v3.0-release: tests/benchmarks: Fix operation on windows

Ray Molenkamp noreply at git.blender.org
Tue Nov 9 17:58:53 CET 2021


Commit: 7c253995765d3af5e3e292bddc88271096c10b82
Author: Ray Molenkamp
Date:   Tue Nov 9 09:58:48 2021 -0700
Branches: blender-v3.0-release
https://developer.blender.org/rB7c253995765d3af5e3e292bddc88271096c10b82

tests/benchmarks: Fix operation on windows

The test script did not work on windows
since it had some trouble importing the
api module on the blender side of things.

turning the file path to the module into
a raw string literal sidesteps the
backslash issue in the path.

Differential Revision: https://developer.blender.org/D13163

Reviewed by: brecht

===================================================================

M	tests/performance/api/environment.py

===================================================================

diff --git a/tests/performance/api/environment.py b/tests/performance/api/environment.py
index eec92cc7b6b..235a1805ba9 100644
--- a/tests/performance/api/environment.py
+++ b/tests/performance/api/environment.py
@@ -235,7 +235,7 @@ class TestEnvironment:
         output_prefix = 'TEST_OUTPUT: '
 
         expression = (f'import sys, pickle, base64\n'
-                      f'sys.path.append("{package_path}")\n'
+                      f'sys.path.append(r"{package_path}")\n'
                       f'import {modulename}\n'
                       f'args = pickle.loads(base64.b64decode({args}))\n'
                       f'result = {modulename}.{functionname}(args)\n'



More information about the Bf-blender-cvs mailing list