1. Ned Batchelder
  2. coverage.py
  3. Issues
Issue #302 duplicate

'coverage run <something>' should do the work of figuring out what 'something' means for me

created an issue

I frequently want to run 'coverage' on an installed script.

On UNIX, this means

coverage run "$(which something)"

On Windows, this means something sort of like

for /f %a in ('where something') do coverage run %a

I'm guessing most people don't even know that second one is possible. And quite frequently, it isn't; setuptools entrypoints will replace your nice .py files with .exe files when they're installed (even in a --develop install) so that users don't need to know about %PATHEXT%.

It would be nice if coverage just had a little smarts in it which could translate a thing that I generally type into a terminal into a Python script. On the platforms I actually use this is just inspecting $PATH, but making coverage smart in this way would also allow Windows users to avoid learning about the ghastly for command or manually re-typing paths all the time.

Comments (1)

  1. Log in to comment