Skip to content

Commit

Permalink
Fix Create Files Unit Test (#1668)
Browse files Browse the repository at this point in the history
* ignore __pycache__ when checking for new files

* formatting fix
  • Loading branch information
Satrat committed Jul 13, 2023
1 parent 3593b1a commit 6d836ed
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tests/sparseml/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,10 @@ def check_for_created_files():
if os.path.isdir(log_dir):
shutil.rmtree(log_dir)

end_files_root = _get_files(directory=r".")
# allow creation of __pycache__ directories
end_files_root = [
f_path for f_path in _get_files(directory=r".") if "__pycache__" not in f_path
]
end_files_temp = _get_files(directory=tempfile.gettempdir())

# assert no files created in root directory while running
Expand Down

0 comments on commit 6d836ed

Please sign in to comment.