Propagating PYTHONPATH in tests
Closed this issue · 2 comments
I am working on running the test suite of this package in nixpkgs.
The nix package manager builds each Python package from source and installs it into its own location in a read-only directory instead of relying on a virtual environment and a wheel. To build an environment with dependencies in which a package can be built, we figure out where the dependencies are in the read-only directory and add them to PYTHONPATH.
Currently, a number of tests are failing because they spawn subprocesses which do not have PYTHONPATH passed along, so dependencies of pyperf such as psutil will not be found.
Would you accept a PR to inherit this environment variable in tests, or do you have other suggestions?
@corona10 @pablogsal: I'm fine with inheriting PYTHONPATH by default, or even consider inheriting all environment variables by default. What do you think?
@corona10 @pablogsal: I'm fine with inheriting PYTHONPATH by default, or even consider inheriting all environment variables by default. What do you think?
I can not expect the side effect, so looks good to go.