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 <ideasman42@gmail.com>2018-07-03 07:47:49 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-07-03 07:55:02 +0300
commit8c15d612a5cdfe39233c7f2b7556742091c82558 (patch)
tree248e7611f9245c1796515baef2ace410bf896c9d /tests/python/modules/render_report.py
parentb66aa0b0a6b123e833d4038a77a5d3f04c37a9a0 (diff)
Cleanup: pep8
Diffstat (limited to 'tests/python/modules/render_report.py')
-rwxr-xr-xtests/python/modules/render_report.py18
1 files changed, 9 insertions, 9 deletions
diff --git a/tests/python/modules/render_report.py b/tests/python/modules/render_report.py
index 67c1108941d..6c71e8dcb74 100755
--- a/tests/python/modules/render_report.py
+++ b/tests/python/modules/render_report.py
@@ -23,6 +23,7 @@ class COLORS_DUMMY:
GREEN = ''
ENDC = ''
+
COLORS = COLORS_DUMMY
@@ -55,10 +56,12 @@ def blend_list(dirpath):
filepath = os.path.join(dirpath, filename)
yield filepath
+
def test_get_name(filepath):
filename = os.path.basename(filepath)
return os.path.splitext(filename)[0]
+
def test_get_images(output_dir, filepath):
testname = test_get_name(filepath)
dirpath = os.path.dirname(filepath)
@@ -96,7 +99,7 @@ class Report:
'update',
'failed_tests',
'passed_tests'
- )
+ )
def __init__(self, title, output_dir, idiff):
self.title = title
@@ -257,7 +260,6 @@ class Report:
else:
self.passed_tests += test_html
-
def _diff_output(self, filepath, tmp_filepath):
old_img, ref_img, new_img, diff_img = test_get_images(self.output_dir, filepath)
@@ -280,7 +282,7 @@ class Report:
"-failpercent", "1",
ref_img,
tmp_filepath,
- )
+ )
try:
subprocess.check_output(command)
failed = False
@@ -307,7 +309,7 @@ class Report:
"-abs", "-scale", "16",
ref_img,
tmp_filepath
- )
+ )
try:
subprocess.check_output(command)
@@ -317,7 +319,6 @@ class Report:
return not failed
-
def _run_test(self, filepath, render_cb):
testname = test_get_name(filepath)
print_message(testname, 'SUCCESS', 'RUN')
@@ -344,7 +345,7 @@ class Report:
return error
elif error == "NO_START":
print_message('Can not perform tests because blender fails to start.',
- 'Make sure INSTALL target was run.')
+ 'Make sure INSTALL target was run.')
return error
elif error == 'VERIFY':
print_message("Rendered result is different from reference image")
@@ -354,7 +355,6 @@ class Report:
'FAILURE', 'FAILED')
return error
-
def _run_all_tests(self, dirname, dirpath, render_cb):
passed_tests = []
failed_tests = []
@@ -387,8 +387,8 @@ class Report:
'SUCCESS', 'PASSED')
if failed_tests:
print_message("{} tests, listed below:" .
- format(len(failed_tests)),
- 'FAILURE', 'FAILED')
+ format(len(failed_tests)),
+ 'FAILURE', 'FAILED')
failed_tests.sort()
for test in failed_tests:
print_message("{}" . format(test), 'FAILURE', "FAILED")