Skip to content

Commit

Permalink
TST/MNT: gitignore output files from test, fix testing output to prop…
Browse files Browse the repository at this point in the history
…erly check if failing_file_diffs array is []
  • Loading branch information
nstelter-slac committed Nov 16, 2024
1 parent 376d27a commit d31ac16
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
suite_scripts/test_*/

# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
Expand Down
3 changes: 2 additions & 1 deletion tests/test_SuiteScripts.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,7 @@ def suite_tester():
'''
# teardown
# can re-enable if everyone's home dirs are getting too filled up, but not deleting avoids confusion on how to find real output files.
# we currently gitignore these output dirs, but to avoid issues we remove them now at start of running this script, instead of here.
for dir in tester.expected_outcome_dirs:
# the folders won't exist if passing b/c of missing dependencies
if os.path.exists(dir):
Expand All @@ -222,7 +223,7 @@ def suite_tester():

# this function runs after all of the pytest code (and prints will come after all pytest output)
def ending_printout():
if failing_file_diffs is not None:
if failing_file_diffs:
print("\n*****************************************************************")
print("Suite-scripts tests failed b/c real output file diffs from expected file.")
print("You can see how these output files are generated by viewing the /tests/test_SuiteScripts.py file.")
Expand Down

0 comments on commit d31ac16

Please sign in to comment.