You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After uninstalling PyQt5 and installing PySide6 in my virtual environment (using poetry add/remove), coverage reports warnings that it cannot parse some non-existent files. It is looking for site-packages pyscript, shibokensupport, and signature_bootstrap.py as if they are in my local folder, when they are actually in my .venv/Lib/site-packages folder:
%userprofile%\code\myproj\.venv\lib\site-packages\coverage\report.py:87: CoverageWarning: Couldn't parse '%userprofile%\Code\myproj\pyscript': No source for code: '%userprofile%\Code\myproj\pyscript'. (couldnt-parse) coverage._warn(msg, slug="couldnt-parse")%userprofile%\code\myproj\.venv\lib\site-packages\coverage\report.py:87: CoverageWarning: Couldn't parse '%userprofile%\Code\myproj\shibokensupport\__init__.py': No source for
code: '%userprofile%\Code\myproj\shibokensupport\__init__.py'. (couldnt-parse)
coverage._warn(msg, slug="couldnt-parse")
%userprofile%\code\myproj\.venv\lib\site-packages\coverage\report.py:87: CoverageWarning: Couldn't parse '%userprofile%\Code\myproj\shibokensupport\feature.py': No source for code: '%userprofile%\Code\myproj\shibokensupport\feature.py'. (couldnt-parse) coverage._warn(msg, slug="couldnt-parse")%userprofile%\code\myproj\.venv\lib\site-packages\coverage\report.py:87: CoverageWarning: Couldn't parse '%userprofile%\Code\myproj\shibokensupport\signature\__init__.py': No source for code: '%userprofile%\Code\myproj\shibokensupport\signature\__init__.py'. (couldnt-parse)
coverage._warn(msg, slug="couldnt-parse")
%userprofile%\code\myproj\.venv\lib\site-packages\coverage\report.py:87: CoverageWarning: Couldn't parse '%userprofile%\Code\myproj\shibokensupport\signature\errorhandler.py': No source for code: '%userprofile%\Code\myproj\shibokensupport\signature\errorhandler.py'. (couldnt-parse) coverage._warn(msg, slug="couldnt-parse")%userprofile%\code\myproj\.venv\lib\site-packages\coverage\report.py:87: CoverageWarning: Couldn't parse '%userprofile%\Code\myproj\shibokensupport\signature\importhandler.py': No source for code: '%userprofile%\Code\myproj\shibokensupport\signature\importhandler.py'. (couldnt-parse)
coverage._warn(msg, slug="couldnt-parse")
%userprofile%\code\myproj\.venv\lib\site-packages\coverage\report.py:87: CoverageWarning: Couldn't parse '%userprofile%\Code\myproj\shibokensupport\signature\layout.py': No source for code: '%userprofile%\Code\myproj\shibokensupport\signature\layout.py'. (couldnt-parse) coverage._warn(msg, slug="couldnt-parse")%userprofile%\code\myproj\.venv\lib\site-packages\coverage\report.py:87: CoverageWarning: Couldn't parse '%userprofile%\Code\myproj\shibokensupport\signature\lib\__init__.py':
No source for code: '%userprofile%\Code\myproj\shibokensupport\signature\lib\__init__.py'. (couldnt-parse)
coverage._warn(msg, slug="couldnt-parse")
%userprofile%\code\myproj\.venv\lib\site-packages\coverage\report.py:87: CoverageWarning: Couldn't parse '%userprofile%\Code\myproj\shibokensupport\signature\lib\enum_sig.py': No source for code: '%userprofile%\Code\myproj\shibokensupport\signature\lib\enum_sig.py'. (couldnt-parse) coverage._warn(msg, slug="couldnt-parse")%userprofile%\code\myproj\.venv\lib\site-packages\coverage\report.py:87: CoverageWarning: Couldn't parse '%userprofile%\Code\myproj\shibokensupport\signature\lib\pyi_generator.py': No source for code: '%userprofile%\Code\myproj\shibokensupport\signature\lib\pyi_generator.py'. (couldnt-parse)
coverage._warn(msg, slug="couldnt-parse")
%userprofile%\code\myproj\.venv\lib\site-packages\coverage\report.py:87: CoverageWarning: Couldn't parse '%userprofile%\Code\myproj\shibokensupport\signature\lib\tool.py': No source for code: '%userprofile%\Code\myproj\shibokensupport\signature\lib\tool.py'. (couldnt-parse) coverage._warn(msg, slug="couldnt-parse")%userprofile%\code\myproj\.venv\lib\site-packages\coverage\report.py:87: CoverageWarning: Couldn't parse '%userprofile%\Code\myproj\shibokensupport\signature\loader.py': No source for code: '%userprofile%\Code\myproj\shibokensupport\signature\loader.py'. (couldnt-parse)
coverage._warn(msg, slug="couldnt-parse")
%userprofile%\code\myproj\.venv\lib\site-packages\coverage\report.py:87: CoverageWarning: Couldn't parse '%userprofile%\Code\myproj\shibokensupport\signature\mapping.py': No source for code: '%userprofile%\Code\myproj\shibokensupport\signature\mapping.py'. (couldnt-parse) coverage._warn(msg, slug="couldnt-parse")%userprofile%\code\myproj\.venv\lib\site-packages\coverage\report.py:87: CoverageWarning: Couldn't parse '%userprofile%\Code\myproj\shibokensupport\signature\parser.py': No source for code: '%userprofile%\Code\myproj\shibokensupport\signature\parser.py'. (couldnt-parse)
coverage._warn(msg, slug="couldnt-parse")
%userprofile%\code\myproj\.venv\lib\site-packages\coverage\report.py:87: CoverageWarning: Couldn't parse '%userprofile%\Code\myproj\signature_bootstrap.py': No source for code: '%userprofile%\Code\myproj\signature_bootstrap.py'. (couldnt-parse) coverage._warn(msg, slug="couldnt-parse")
Expected vs actual result
Expect coverage not to search for non-existent files and to not warn.
Summary
After uninstalling
PyQt5
and installingPySide6
in my virtual environment (usingpoetry add/remove
),coverage
reports warnings that it cannot parse some non-existent files. It is looking for site-packagespyscript
,shibokensupport
, andsignature_bootstrap.py
as if they are in my local folder, when they are actually in my.venv/Lib/site-packages
folder:Expected vs actual result
Expect coverage not to search for non-existent files and to not warn.
Reproducer
Create and activate a virtual environment
and ensure
vscode
sees thePython Interpreter
(useCtrl+Shift+p
and set).Create a new poetry project
PS> poetry init
Install
pytest
,pytest-cov
,pytest-env
,pytest-qt
,pyqt5
, andqtpy
Update the
pyproject.toml
and then runpoetry install
to make a local (editable) installCreate a dummy
Qt
projectmyproj/main.py
Create a dummy test
test/test_window.py
Run
pytest
PS> pytest
Add
pyside6
and removepyqt5
NOTE: Before doing this, be sure to set python exactly to
3.8
in thepyproject.toml
:Change
qt_api
inpyproject.toml
:Update project with new toml
PS> poetry update
Re-run
pytest
PS> pytest
This generates the error messages mentioned.
Versions
OS: Windows 10
Python: 3.8.10
VSCode: 1.67.2
Config
N/A (see
Reproducer
)Code
N/A (see
Reproducer
)The text was updated successfully, but these errors were encountered: