| # Because of how coverage is run, the current directory is the first in |
| # sys.path. This is a problem for the tests, because they may import a module of |
| # the same name as a module in the current directory. |
| # |
| # NOTE @aignas 2023-06-05: we have to do this before anything from coverage gets |
| # imported. |
| diff --git a/coverage/__main__.py b/coverage/__main__.py |
| index ce2d8db..7d7d0a0 100644 |
| --- a/coverage/__main__.py |
| +++ b/coverage/__main__.py |
| @@ -6,5 +6,6 @@ |
| from __future__ import annotations |
| |
| import sys |
| +sys.path.append(sys.path.pop(0)) |
| from coverage.cmdline import main |
| sys.exit(main()) |