[Bf-blender-cvs] [58a3057099f] blender2.8: Layers Unittest: Hidden flag to quckly update diffs

Dalai Felinto noreply at git.blender.org
Fri Nov 10 16:02:12 CET 2017


Commit: 58a3057099fda337bb9b416d297b8cc3078238ec
Author: Dalai Felinto
Date:   Fri Nov 10 12:33:03 2017 -0200
Branches: blender2.8
https://developer.blender.org/rB58a3057099fda337bb9b416d297b8cc3078238ec

Layers Unittest: Hidden flag to quckly update diffs

This is not the commit you are looking for ...

This is not to be used lightly. But sometimes we change the name of the collections,
the initial value they have, ... and this helps to quickly update the tests.

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

M	tests/python/render_layer/render_layer_common.py

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

diff --git a/tests/python/render_layer/render_layer_common.py b/tests/python/render_layer/render_layer_common.py
index 683f8c5ccff..7e8cbf988c8 100644
--- a/tests/python/render_layer/render_layer_common.py
+++ b/tests/python/render_layer/render_layer_common.py
@@ -159,6 +159,7 @@ def dump(data):
 
 PDB = False
 DUMP_DIFF = True
+UPDATE_DIFF = False # HACK used to update tests when something change
 
 
 def compare_files(file_a, file_b):
@@ -172,6 +173,11 @@ def compare_files(file_a, file_b):
             import subprocess
             subprocess.call(["diff", "-u", file_a, file_b])
 
+        if UPDATE_DIFF:
+            import subprocess
+            subprocess.call(["cp", "-u", file_a, file_b])
+
+
         if PDB:
             import pdb
             print("Files differ:", file_a, file_b)



More information about the Bf-blender-cvs mailing list