Skip to content

Commit

Permalink
Cleaning up file checks
Browse files Browse the repository at this point in the history
  • Loading branch information
pshriwise committed Aug 16, 2024
1 parent 293782d commit d1eb530
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions test/test_examples.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,6 @@ def test_example(example, request):
output = example_name(example)
to_cubit_journal(model.geometry, world=world, filename=output)

if not filecmp.cmp(output, request.path.parent / Path('gold') / output):
print(''.join(difflib.unified_diff(open(output).readlines(), request.path.parent / open(Path('gold') / output).readlines())))
gold_file = request.path.parent / Path('gold') / Path(output)
if not filecmp.cmp(output, gold_file):
print(''.join(difflib.unified_diff(open(output).readlines(), open(gold_file).readlines())))

0 comments on commit d1eb530

Please sign in to comment.