Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tear down PermissionError bug fix for Windows OS #218

Merged
merged 4 commits into from
Mar 16, 2024
Merged

Conversation

Domejko
Copy link
Contributor

@Domejko Domejko commented Mar 16, 2024

Description

Tear down PermissionError bug fix for Windows OS #173.
Isolated test class ReceiptDownloadEndpointsTest to a separate file test_reciepts_download.py. Changed class inheritance from ViewTestCase to TestCase. Created a tearDownClass classmethod. This changes are made to avoid conflicts between tests while running i parallel on Windows what was causing PermissionError: [Errno 13] The process cannot access the file because it is being used by another process due to the way how Windows is handling the processes.
Added try/except block with info message to catch random occurrences of the error.

Checklist

  • Ran the Black Formatter and
    djLint-er on any new code
    (checks
    will
    fail without)
  • Made any changes or additions to the documentation where required
  • Changes generate no new warnings/errors
  • New and existing unit tests pass locally with my
    changes

What type of PR is this?

  • 🐛 Bug Fix

Added/updated tests?

  • 🙅 no, because they aren't needed

Related PRs, Issues etc

@TreyWW TreyWW merged commit 62f2c56 into TreyWW:main Mar 16, 2024
14 checks passed
@TreyWW
Copy link
Owner

TreyWW commented Mar 16, 2024

Thanks for the contributions recently @Domejko, much appreciated!

@Domejko Domejko deleted the bug-fix branch March 18, 2024 12:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] Tests fail due to receipt still open when tearing down tests
2 participants