man-group / man-group/pytest-plugins
shutil run module using sys.executable
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 597
- Forks
- 89
- PR merge metrics
- No merged PRs in 30d
Description
I was surprised that the very common case of "run package module using sys.executable" isnt supported. i.e. `[sys.executable, '-m', 'package']`
It isnt the same as `run_module_as_main`, as invoking the real Python executable can be necessary to catch extra problems related to IO setup, esp `LANG`, `PYTHONIOENCODING` etc.
It is quite often done incorrectly, e.g. without quotes around `sys.executable` as I did above, which is usually ok on unix but often fails on Windows.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the plugin code that wraps or invokes shutil commands and review its existing tests. Compare the requested package-module invocation with run_module_as_main, including executable paths containing spaces and IO-related environment handling. Done means the plugin supports [sys.executable, '-m', 'package'] correctly and has coverage for the relevant behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- testing-qa
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100