diff options
author | Dalai Felinto <dfelinto@gmail.com> | 2017-11-10 17:33:03 +0300 |
---|---|---|
committer | Dalai Felinto <dfelinto@gmail.com> | 2017-11-10 18:01:05 +0300 |
commit | 58a3057099fda337bb9b416d297b8cc3078238ec (patch) | |
tree | 15f3ba2102f5df52823f692639324ba6a3b90723 /tests | |
parent | 1122a401b026cd33f61d4cfe9f8590c934bd24a9 (diff) |
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.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/python/render_layer/render_layer_common.py | 6 |
1 files changed, 6 insertions, 0 deletions
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) |