Repository navigation
chore(tests): do not use hard-coded paths in tests - #1834
Merged
Merged
Conversation
mayeut
marked this pull request as draft
May 25, 2024 17:42
mayeut
force-pushed
the
use-tmp_path-for-tests
branch
from
May 25, 2024 18:50
a0166d4 to
1e9be73
Compare
mayeut
marked this pull request as ready for review
May 25, 2024 21:20
Member
Author
|
@henryiii, would you mind reviewing this one ? I don't mind waiting for pyodide PR to land first but I'd rather have it the other way around though (and I'm willing to fix conflicts there if it helps). |
henryiii
approved these changes
May 26, 2024
|
|
||
| # TODO: This is not valid in an virtual environment | ||
| assert stored_path == current_path, '{0} != {1}'.format(stored_path, current_path) | ||
| assert os.stat(stored_prefix) == os.stat(sys.prefix) |
Contributor
There was a problem hiding this comment.
Why not os.path.samefile?
Contributor
There was a problem hiding this comment.
There is also at least one more existing os.stat compare that would read better this way, imo. But could be a follow up because this matches the existing one(s).
Member
Author
There was a problem hiding this comment.
This check was already used in test_before_test.py so I reused it here.
I will change them for samefile which seems better suited.
use `os.path.samefile` rather than comparing `os.stat` directly.
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.
This would help reduce the amount of specific code for pyodide in #1456