Skip to content

Commit

Permalink
- F log location
Browse files Browse the repository at this point in the history
Co-Authored-By: Jay Bazuzi <jay@bazuzi.com>
Co-Authored-By: 4dsherwood <4dsherwood@users.noreply.github.com>
Co-Authored-By: Joss Hufnagel <43077216+blade290@users.noreply.github.com>
Co-Authored-By: Nitsan Avni <nitsanav@gmail.com>
  • Loading branch information
5 people committed Oct 6, 2024
1 parent 9d51dbf commit 0c90f82
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ atlassian-ide-plugin.xml
# caches
.cache/
.pytest_cache
.approval_tests_temp/

# virtual environments
virtualenv
Expand All @@ -66,4 +67,3 @@ venv
.DS_Store
tests/approved_files/VerifyTests.test_verify_automatic_approval.approved.txt
tests/approved_files/VerifyTests.test_verify_automatic_approval.approved.txt
.approved_files.log
7 changes: 5 additions & 2 deletions approvaltests/approved_file_log.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,14 @@
class ApprovedFilesLog:
@staticmethod
def clear_log_file() -> None:
ApprovedFilesLog.get_approved_files_log().unlink(missing_ok=True)
ApprovedFilesLog.get_approved_files_log().write_text("")

@staticmethod
def get_approved_files_log() -> Path:
return Path(".approved_files.log")
path = Path(".approval_tests_temp/.approved_files.log")
path.parent.mkdir(parents=True, exist_ok=True)

return path

@staticmethod
def log(approved_file):
Expand Down

0 comments on commit 0c90f82

Please sign in to comment.