question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

CoverageScript.command_line wipes out 1st sys.path entry.

See original GitHub issue

This can be problematic if the coverage distribution itself is not the first item on the classpath: https://github.com/nedbat/coveragepy/blob/401471c1c51c2a99b31b0508578d04b4da03eebb/coverage/cmdline.py#L468-L470

Is there any reason this couldn’t be a sys.path.insert(0, '')?

I’m happy to do the work but I just wanted to run this by you first.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:23 (12 by maintainers)

github_iconTop GitHub Comments

0reactions
nedbatcommented, Nov 25, 2018

This is re-fixed in commit b7e0eec3d794ee350f8a4392a0c9cc90fff54fa0, released as part of 5.0a4.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Change history for coverage.py - Read the Docs
The coverage run command has always adjusted the first entry in sys.path, to properly emulate how Python runs your program. Now this adjustment...
Read more >
25.1. sys — System-specific parameters and functions
This module provides access to some variables used or maintained by the interpreter and to functions that interact strongly with the interpreter. It...
Read more >
dotnet-coverage code coverage tool - .NET CLI - Microsoft Learn
Removes all input coverage reports that were merged. -r, --recursive ... coverage data. <args>. The command line arguments for the command.
Read more >
28.1. sys — System-specific parameters and functions
The list of command line arguments passed to a Python script. ... This function prints out a given traceback and exception to sys.stderr....
Read more >
optparse — Parser for command line options — Python 3.11.1 ...
and optparse will print out a brief summary of your script's options: ... In Python, arguments are elements of sys.argv[1:] ( sys.argv[0] is...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found