diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2016-08-06 13:25:24 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2016-08-06 13:45:03 +0300 |
commit | 9843921288307be33fc39450586ff9ad226829a1 (patch) | |
tree | de6e0ddd71b48d036bf5525e62edf10a57d3238e /tests/python | |
parent | 4571fdde0ecfdebac6a9374364b05be74233aca5 (diff) | |
parent | 28c3bdf50bd62b510fdbd88a5dcb1c40f8726c20 (diff) |
Merge branch 'master' into blender2.8
Conflicts:
release/scripts/startup/bl_ui/properties_particle.py
release/scripts/startup/bl_ui/properties_physics_cloth.py
release/scripts/startup/bl_ui/properties_physics_dynamicpaint.py
release/scripts/startup/bl_ui/properties_physics_softbody.py
source/blender/blenkernel/BKE_library.h
source/blender/blenkernel/BKE_particle.h
source/blender/blenkernel/intern/cloth.c
source/blender/blenkernel/intern/library.c
source/blender/blenkernel/intern/library_query.c
source/blender/blenkernel/intern/particle_system.c
source/blender/blenkernel/intern/scene.c
source/blender/blenkernel/intern/softbody.c
source/blender/blenloader/intern/readfile.c
source/blender/blenloader/intern/versioning_270.c
source/blender/editors/space_file/filesel.c
source/blender/editors/space_outliner/outliner_intern.h
source/blender/makesdna/DNA_ID.h
source/blender/makesdna/DNA_object_force.h
source/blender/makesdna/DNA_particle_types.h
source/blender/makesrna/intern/rna_particle.c
source/blender/makesrna/intern/rna_sculpt_paint.c
source/blender/makesrna/intern/rna_smoke.c
source/blender/makesrna/intern/rna_space.c
Diffstat (limited to 'tests/python')
-rwxr-xr-x | tests/python/cycles_render_tests.py | 15 | ||||
-rw-r--r-- | tests/python/pep8.py | 13 |
2 files changed, 19 insertions, 9 deletions
diff --git a/tests/python/cycles_render_tests.py b/tests/python/cycles_render_tests.py index e1b5e2d1d23..fb9a4b348b7 100755 --- a/tests/python/cycles_render_tests.py +++ b/tests/python/cycles_render_tests.py @@ -17,6 +17,8 @@ def render_file(filepath): "--factory-startup", filepath, "-E", "CYCLES", + # Run with OSL enabled + # "--python-expr", "import bpy; bpy.context.scene.cycles.shading_system = True", "-o", TEMP_FILE_MASK, "-F", "PNG", "-f", "1", @@ -66,15 +68,16 @@ def verify_output(filepath): ) try: subprocess.check_output(command) - if os.path.exists(failed_image): - os.remove(failed_image) - return True + failed = False except subprocess.CalledProcessError as e: - if e.returncode != 1: - shutil.copy(TEMP_FILE, failed_image) if VERBOSE: print(e.output.decode("utf-8")) - return e.returncode == 1 + failed = e.returncode != 1 + if failed: + shutil.copy(TEMP_FILE, failed_image) + elif os.path.exists(failed_image): + os.remove(failed_image) + return not failed def run_test(filepath): diff --git a/tests/python/pep8.py b/tests/python/pep8.py index 61093fd7c27..0e6250f534b 100644 --- a/tests/python/pep8.py +++ b/tests/python/pep8.py @@ -113,7 +113,7 @@ def main(): print("%s:%d:0: empty class (), remove" % (f, i + 1)) del re, class_check - print("\n\n\n# running pep8...") + print("\n\n\n# running flake8...") # these are very picky and often hard to follow # while keeping common script formatting. @@ -128,6 +128,10 @@ def main(): # "imports not at top of file." # prefer to load as needed (lazy load addons etc). "E402", + # "do not compare types, use 'isinstance()'" + # times types are compared, + # I rather keep them specific + "E721", ) for f, pep8_type in files: @@ -138,7 +142,10 @@ def main(): else: ignore_tmp = ignore - os.system("pep8 --repeat --ignore=%s '%s'" % (",".join(ignore_tmp), f)) + os.system("flake8 " + "--isolated " + "--ignore=%s '%s'" % + (",".join(ignore_tmp), f)) # frosted print("\n\n\n# running frosted...") @@ -152,6 +159,7 @@ def main(): "--disable=" "C0111," # missing doc string "C0103," # invalid name + "C0413," # import should be placed at the top "W0613," # unused argument, may add this back # but happens a lot for 'context' for eg. "W0232," # class has no __init__, Operator/Panel/Menu etc @@ -165,7 +173,6 @@ def main(): "R0914," # Too many local variables "R0915," # Too many statements " " - "--include-ids=y " "--output-format=parseable " "--reports=n " "--max-line-length=1000" |