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.
This commit is contained in:
parent
1122a401b0
commit
58a3057099
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user