Registry / testing / pytest-pycharm

pytest-pycharm

JSON →
library0.7.0pypypiunverified

Plugin for pytest to drop into PyCharm debugger on uncaught exceptions. Version 0.7.0 is the latest, with no recent updates. The plugin is in maintenance mode.

pip install pytest-pycharm
INSTALL
IMPORT
SIG · PYTEST-PYCHARM
P
pytest-pycharm
testingpythonv0.7.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Install and run pytest with --pycharm flag to enable PyCharm debugger on uncaught exceptions. Ensure PyCharm debug server is listening.

import sys import os os.environ.setdefault('PYCHARM_DEBUG_PORT', '12345') # Run pytest with --pycharm # ptest --pycharm tests/
Debug
Known issues
gotchaThe plugin only works with PyCharm debug server; you must have PyCharm running with a Python Debug Server configured.
fix
Set up PyCharm's Remote Debug configuration (Run > Edit Configurations > Python Debug Server) and note the port.
affects: all
gotchaThe plugin does not automatically connect; you must manually start the PyCharm debug server before running tests.
fix
In PyCharm, run the 'Python Debug Server' configuration before executing pytest.
affects: all
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'pytest_pycharm'
Missing installation or incorrect import path.
fix
pip install pytest-pycharm. The plugin registers itself as a pytest plugin; no import needed.
Error: unrecognized arguments: --pycharm
Plugin not installed or not activated.
fix
Ensure pytest-pycharm is installed (pip list | grep pytest-pycharm) and run pytest with the --pycharm flag.
Upgrade
Version history
0.7.0latest on PyPI · released Aug 13, 2020
Audit
Dependencies

No dependency data recorded yet.

Agent activity
2 hits · last 30 days
node
2
Resources
pytest-pycharm — pip install pytest-pycharm · libregistry