man-group / man-group/pytest-plugins
`--profile-svg` doesn't work on windows, fails silently
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 597
- Forks
- 89
- PR merge metrics
- No merged PRs in 30d
Description
`pytest-profile` uses [`pipes.py`](https://docs.python.org/2/library/pipes.html) to create a pipe that converts a `.prof` file to an `.svg` using external programs, but `pipes.py` only produces posix-shell commands. The pipe is defined by `pytest-profile` as follows:
t = pipes.Template()
t.append("gprof2dot -f pstats $IN", "f-")
t.append("dot -Tsvg -o $OUT", "-f")
t.copy(self.combined, self.svg_name)
At the last line of the above snippet, `pipes.py` calls `os.system( str_command )` with `str_command` being the following literal:
IN=''; gprof2dot -f pstats $IN |
{ OUT=''; dot -Tsvg -o $OUT; }
...which isn't valid Windows batch syntax.
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 with the pytest-profile implementation of --profile-svg and the pipes.py usage shown in the issue. Trace how the .prof-to-.svg command is assembled and executed on Windows; done means --profile-svg produces the SVG successfully instead of failing silently.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- testing-qa, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100