PyCharm running Unittests with coverage with remote interpreter (vagrant) not showing on "coverage view"

Using PyCharm 2019.3.1 (Professional edition),

running unittests with coverage do show coverage percentage on the project files tree (left pane), and also show the right colors for code lines covered.
but, it doesn't show anything in the "Coverage view" window (right pane), except for the `.idea` folder.

I would guess it has some troubles in the paths mapping, but anything else works fine.

0
10 comments

Could you share a screenshot of your coverage settings?
Settings/Preferences | Build, Execution, Deployment | Coverage

Also, check your idea.log (Help | Show Log in...) and see if it has similar entries https://youtrack.jetbrains.com/issue/PY-36295

0
Avatar
Permanently deleted user

(didn't find anything related in the issue you've linked)

the relevant logs I've got:



2020-01-16 17:13:25,407 [84507712] INFO - plots.PySciEnvironmentProvider - Plots on port: 36178
2020-01-16 17:13:25,418 [84507723] INFO - plugins.remotesdk.RemoteUpload - Uploading helpers to /home/vagrant/.pycharm_helpers
2020-01-16 17:13:25,419 [84507724] INFO - .channel.direct.SessionChannel - Will request `sftp` subsystem
2020-01-16 17:13:25,440 [84507745] INFO - plugins.remotesdk.RemoteUpload - Remote helpers version is PY-193.5662.61, local helpers version is PY-193.5662.61
2020-01-16 17:13:25,453 [84507758] INFO - .channel.direct.SessionChannel - Will request `sftp` subsystem
2020-01-16 17:14:13,226 [84555531] WARN - ebDeployment.TransferOperation - File /Users/victor/Library/Caches/PyCharm2019.3/coverage/backend$Unittests_for_TestMyServiceExpectations_TestMyServiceExpectations.coverage is larger than 1048576 bytes, its base revision will not be stored
2020-01-16 17:14:13,543 [84555848] WARN - ebDeployment.TransferOperation - File /Users/victor/Library/Caches/PyCharm2019.3/coverage/backend$Unittests_for_TestMyServiceExpectations_TestMyServiceExpectations.xml is larger than 1048576 bytes, its base revision will not be stored
2020-01-16 17:14:13,543 [84555848] INFO - .diagnostic.PerformanceWatcher - Downloading remote files took 378ms; general responsiveness: ok; EDT responsiveness: ok


0

How does it go with Use bundled coverage.py enabled?

0
Avatar
Permanently deleted user

same results:

2020-01-16 19:22:28,215 [92250520]   INFO - plots.PySciEnvironmentProvider - Plots on port: 36178 
2020-01-16 19:22:28,222 [92250527] INFO - plugins.remotesdk.RemoteUpload - Uploading helpers to /home/vagrant/.pycharm_helpers
2020-01-16 19:22:28,223 [92250528] INFO - .channel.direct.SessionChannel - Will request `sftp` subsystem
2020-01-16 19:22:28,246 [92250551] INFO - plugins.remotesdk.RemoteUpload - Remote helpers version is PY-193.5662.61, local helpers version is PY-193.5662.61
2020-01-16 19:22:28,249 [92250554] INFO - .channel.direct.SessionChannel - Will request `sftp` subsystem
2020-01-16 19:23:07,578 [92289883] WARN - ebDeployment.TransferOperation - File /Users/victor/Library/Caches/PyCharm2019.3/coverage/backend$Unittests_for_TestMyServiceExpectations_TestMyServiceExpectations.coverage is larger than 1048576 bytes, its base revision will not be stored
2020-01-16 19:23:07,769 [92290074] WARN - ebDeployment.TransferOperation - File /Users/victor/Library/Caches/PyCharm2019.3/coverage/backend$Unittests_for_TestMyServiceExpectations_TestMyServiceExpectations.xml is larger than 1048576 bytes, its base revision will not be stored
2020-01-16 19:23:07,770 [92290075] INFO - .diagnostic.PerformanceWatcher - Downloading remote files took 231ms; general responsiveness: ok; EDT responsiveness: ok
2020-01-16 19:23:07,770 [92290075] INFO - thon.coverage.PyCoverageRunner - Loading coverage data from /Users/victor/Library/Caches/PyCharm2019.3/coverage/backend$Unittests_for_TestMyServiceExpectations_TestMyServiceExpectations.xml


0
Avatar
Permanently deleted user

Sergey Karpov, do you have any lead?

0

@Victor Bouhnik

Sorry for the delay in response.

I tried to reproduce it but it works fine. Which Vagrant box do you use?
Is it Python 2 or 3?

0
Avatar
Permanently deleted user

Sergey Karpov

Actually, I have couple of interpreters defined: one with python 2.7 and the other with python 3.6.

when running with the 3.6 interpreter I get what I wrote in the OP.

however, when running with the 2.7 interpreter,  I get the following:

ssh://vagrant@127.0.0.1:2222/opt/myenv/path/to/python/bin/python -u /home/vagrant/.pycharm_helpers/coverage_runner/run_coverage.py run --branch --omit=\"/Applications/PyCharm.app/Contents/plugins/python/helpers*\" /home/vagrant/.pycharm_helpers/pycharm/_jb_unittest_runner.py --target TestMyTest.TestManager.test_bla
Traceback (most recent call last):
File "/home/vagrant/.pycharm_helpers/coverage_runner/run_coverage.py", line 13, in <module>
from coverage.cmdline import main
ImportError: No module named coverage.cmdline

Process finished with exit code 1

Empty suite

 

0

Try starting PyCharm with default settings by temporarily removing the config folder https://www.jetbrains.com/help/pycharm/directories-used-by-the-ide-to-store-settings-caches-plugins-and-logs.html

Has it helped?

Which Box do you use for Python 3.6?

0
Avatar
Permanently deleted user

Actually, it worked with the default settings.
I'll try to figure out what went wrong with my previous configuration.

thanks.
I'm using MacOS Mojave BTW.

0

PyCharm 2022.2.3 still not solved

0

Please sign in to leave a comment.