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
diff options
context:
space:
mode:
authorCampbell Barton <campbell@blender.org>2022-04-19 08:25:55 +0300
committerCampbell Barton <campbell@blender.org>2022-04-19 08:25:55 +0300
commit3035235defe0f3a6314e10ceab4c94be86086344 (patch)
treec9c5b22f42c785da4dfad027d648b0cd197e1796 /tests/performance
parent58d86527ae283b94ba18f54b1fcef1cb8063c910 (diff)
Cleanup: run autopep8 on tests/
Diffstat (limited to 'tests/performance')
-rw-r--r--tests/performance/api/config.py13
-rw-r--r--tests/performance/api/environment.py11
-rw-r--r--tests/performance/api/test.py2
3 files changed, 15 insertions, 11 deletions
diff --git a/tests/performance/api/config.py b/tests/performance/api/config.py
index 03d699cfdfb..6d095065123 100644
--- a/tests/performance/api/config.py
+++ b/tests/performance/api/config.py
@@ -68,11 +68,14 @@ class TestQueue:
def rows(self, use_revision_columns: bool) -> List:
# Generate rows of entries for printing and running.
- entries = sorted(self.entries, key=lambda entry:
- (entry.revision,
- entry.device_id,
- entry.category,
- entry.test))
+ entries = sorted(
+ self.entries,
+ key=lambda entry: (
+ entry.revision,
+ entry.device_id,
+ entry.category,
+ entry.test,
+ ))
if not use_revision_columns:
# One entry per row.
diff --git a/tests/performance/api/environment.py b/tests/performance/api/environment.py
index 61a7c5dff7b..1e2e4a84e81 100644
--- a/tests/performance/api/environment.py
+++ b/tests/performance/api/environment.py
@@ -32,7 +32,7 @@ class TestEnvironment:
self._init_default_blender_executable()
self.set_default_blender_executable()
- def get_machine(self, need_gpus: bool=True) -> None:
+ def get_machine(self, need_gpus: bool = True) -> None:
if not self.machine or (need_gpus and not self.machine.has_gpus):
self.machine = TestMachine(self, need_gpus)
@@ -61,7 +61,8 @@ class TestEnvironment:
if not self.blender_dir.exists():
print(f'Init git worktree in {self.blender_dir}')
- self.call([self.git_executable, 'worktree', 'add', '--detach', self.blender_dir, 'HEAD'], self.blender_git_dir)
+ self.call([self.git_executable, 'worktree', 'add', '--detach',
+ self.blender_dir, 'HEAD'], self.blender_git_dir)
else:
print(f'Exists {self.blender_dir}')
@@ -165,7 +166,7 @@ class TestEnvironment:
def unset_log_file(self) -> None:
self.log_file = None
- def call(self, args: List[str], cwd: pathlib.Path, silent: bool=False, environment: Dict={}) -> List[str]:
+ def call(self, args: List[str], cwd: pathlib.Path, silent: bool = False, environment: Dict = {}) -> List[str]:
# Execute command with arguments in specified directory,
# and return combined stdout and stderr output.
@@ -220,7 +221,7 @@ class TestEnvironment:
def run_in_blender(self,
function: Callable[[Dict], Dict],
args: Dict,
- blender_args: List=[],
+ blender_args: List = [],
foreground=False) -> Dict:
# Run function in a Blender instance. Arguments and return values are
# passed as a Python object that must be serializable with pickle.
@@ -274,7 +275,7 @@ class TestEnvironment:
return names
- def get_configs(self, name: str=None, names_only: bool=False) -> List:
+ def get_configs(self, name: str = None, names_only: bool = False) -> List:
# Get list of configurations in the benchmarks directory.
configs = []
diff --git a/tests/performance/api/test.py b/tests/performance/api/test.py
index 72e72463cd1..d3ec092f78d 100644
--- a/tests/performance/api/test.py
+++ b/tests/performance/api/test.py
@@ -32,7 +32,7 @@ class Test:
class TestCollection:
- def __init__(self, env, names_filter: List=['*'], categories_filter: List=['*']):
+ def __init__(self, env, names_filter: List = ['*'], categories_filter: List = ['*']):
import importlib
import pkgutil
import tests