Hi all,
I have an application that execute pytest.main().
simplified code snippet:
---
import pytest
import pytest_html
def run_tests(test_func):
test_module = os.path.join(sys._MEIPASS, "tests.py")
return pytest.main(["-vvv", "-p", "pytest_html", "--html=report.html", "--capture=tee-sys", test_module])
---
The result is that pytest-html plugin fails to load:
----
ERROR: usage: aidoc-probe.exe [options] [file_or_dir] [file_or_dir] [...]
aidoc-probe.exe: error: unrecognized arguments: --html=report.html
inifile: None
rootdir: D:\prob-test
----
Running the same code without ["-p", "pytest_html", "--html=report.html"] run as expected and I have the standard pytest output.
I running pyinstaller on Windows box, using conda environment.
In the environment I have pytest-html package installed.
Any help will be appreciated.
Thanks,
Avi