Deleted some temporary files that CLI tests were creating#153
Merged
bbc2 merged 1 commit intotheskumar:masterfrom Dec 30, 2018
Merged
Deleted some temporary files that CLI tests were creating#153bbc2 merged 1 commit intotheskumar:masterfrom
bbc2 merged 1 commit intotheskumar:masterfrom
Conversation
1 similar comment
f628767 to
f9863d3
Compare
Collaborator
|
This looks useful. Thanks for improving test isolation! I realize these tests are really fishy, notably because they use |
bbc2
added a commit
to bbc2/python-dotenv
that referenced
this pull request
Dec 31, 2018
The test suite had the following issues: * A failing test would leave files in the `tests` directory, causing other tests to fail unexpectedly. * Even successful tests would require clean up code like `sh.rm(...)` to avoid leaving test files. This was easy to forget as shown by theskumar#153. * The same test file would be used for several tests, making them unsafe to run in parallel. This commit fixes that by using the `dotenv_file` and `tmp_path` fixtures whenever the filesystem is required. The advantage of those fixtures is that they use unique test directories, which are eventually cleaned up. The `tmp_path` fixture is preferred to the `tmpdir` fixture because `tmpdir` relies on `py.path`, a library in "maintenance mode".
Merged
theskumar
pushed a commit
that referenced
this pull request
Jan 1, 2019
The test suite had the following issues: * A failing test would leave files in the `tests` directory, causing other tests to fail unexpectedly. * Even successful tests would require clean up code like `sh.rm(...)` to avoid leaving test files. This was easy to forget as shown by #153. * The same test file would be used for several tests, making them unsafe to run in parallel. This commit fixes that by using the `dotenv_file` and `tmp_path` fixtures whenever the filesystem is required. The advantage of those fixtures is that they use unique test directories, which are eventually cleaned up. The `tmp_path` fixture is preferred to the `tmpdir` fixture because `tmpdir` relies on `py.path`, a library in "maintenance mode".
johnbergvall
pushed a commit
to johnbergvall/python-dotenv
that referenced
this pull request
Aug 13, 2021
The test suite had the following issues: * A failing test would leave files in the `tests` directory, causing other tests to fail unexpectedly. * Even successful tests would require clean up code like `sh.rm(...)` to avoid leaving test files. This was easy to forget as shown by theskumar#153. * The same test file would be used for several tests, making them unsafe to run in parallel. This commit fixes that by using the `dotenv_file` and `tmp_path` fixtures whenever the filesystem is required. The advantage of those fixtures is that they use unique test directories, which are eventually cleaned up. The `tmp_path` fixture is preferred to the `tmpdir` fixture because `tmpdir` relies on `py.path`, a library in "maintenance mode".
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
While working on another PR I noticed that running the test suite was leaving a
tests/dotenvfile. There appeared to be two test functions that were creating that file but not deleting it when done.