bloomberg / memray

Memray is a memory profiler for Python
https://bloomberg.github.io/memray/
Apache License 2.0
13.17k stars 392 forks source link

Fix `sys.path` manipulations for isolated mode #552

Closed godlygeek closed 7 months ago

godlygeek commented 7 months ago

Closes #551

I struggled to write good tests for this, and while working on it I realized that at least one of the existing tests wasn't actually proving what it set out to prove, so I restructured the existing tests as well.

codecov-commenter commented 7 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (41248ed) 92.55% compared to head (9bea3f5) 92.86%. Report is 17 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #552 +/- ## ========================================== + Coverage 92.55% 92.86% +0.31% ========================================== Files 91 91 Lines 11304 11158 -146 Branches 1581 2034 +453 ========================================== - Hits 10462 10362 -100 + Misses 837 796 -41 + Partials 5 0 -5 ``` | [Flag](https://app.codecov.io/gh/bloomberg/memray/pull/552/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=bloomberg) | Coverage Δ | | |---|---|---| | [cpp](https://app.codecov.io/gh/bloomberg/memray/pull/552/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=bloomberg) | `92.86% <100.00%> (+6.92%)` | :arrow_up: | | [python_and_cython](https://app.codecov.io/gh/bloomberg/memray/pull/552/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=bloomberg) | `92.86% <100.00%> (-2.86%)` | :arrow_down: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=bloomberg#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.