Closed Raglar closed 5 years ago
Thanks for reporting! This lookup error is most likely not related to the plugin. Unfortunately I'm not familiar with Anaconda setups on Windows, so I can't give you a lot of useful advice on how to fix it.
Maybe running the failing script with python -v ...
gives you a hint where Python is looking up the imports. Also, maybe using python -m pytest
instead of pytest
picks up the right pytest installation.
If you have reason to think this is a bug in this library, feel free to reopen the issue.
Hello! First of all thank you for this great lib.
The issue is the following error:
from pytest_jsonreport.plugin import JSONReport ModuleNotFoundError: No module named 'pytest_jsonreport'
when using the following snippet:
import pytest from pytest_jsonreport.plugin import JSONReport plugin = JSONReport() pytest.main(['test_foo.py'], plugins=[plugin])
however, using
$ pytest --json-report --json-report-summary
works fineI'm using miniconda with a virtual env in Windows, using
where pip
command points to the correct pip executable with the correct virtual env name.versions: Python 3.7.3 pytest-json-report-1.0.3 pip 19.0.3 pytest 4.3.1 (displaying that this lib is a registered plugin)
thanks in advanced