spyder-ide / spyder-unittest

A plugin for Spyder to run tests and view the results
MIT License
79 stars 34 forks source link

Check target environment instead of Spyder environment for dependencies #177

Closed jitseniesen closed 2 years ago

jitseniesen commented 2 years ago

As noted in https://github.com/spyder-ide/spyder-unittest/issues/175#issuecomment-1164685995, the plugin uses the environment that Spyder runs in to find its dependencies (nose, pytest and their plugins). Instead, it should use the environment that the user configured for running the tests.

This happens in the following places (at least): when testing whether a test run configuration is valid, when using the plugin option menu item "Show dependencies", when checking for pytest-cov in PR #175.

jitseniesen commented 2 years ago

See https://github.com/spyder-ide/spyder-kernels/pull/392#issuecomment-1166323922 for a possible way to implement this.

jitseniesen commented 2 years ago

A problem with using the IPythonConsole plugin to check the environment is that (as far as I can tell) there is not necessarily a console open with the current environment.