-
Notifications
You must be signed in to change notification settings - Fork 399
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tests: Improve tests for our
sys.path
changes
As these were previously written, they didn't actually prove that the original entry added by Python when memray was run had been removed, which is especially problematic since: python -m memray run -m somemodule would remove an entry added by Python and re-add that same entry. We had no proof this was actually running the expected code and making the expected changes. Use `python -c ...` when running `memray run -m` to exercise this better, since we can check that the (different) path that would be added by the interpreter has been replaced. Continue using `python -m memray` when running `memray run -c cmd` and `memray run script.py`, but have the script that gets run print the entirety of `sys.path` so we can make assertions about what isn't there as well as what is. Signed-off-by: Matt Wozniski <[email protected]>
- Loading branch information
Showing
1 changed file
with
22 additions
and
35 deletions.
There are no files selected for viewing
This file contains 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