Files
pytest2/testing/freeze/create_executable.py
Ran Benita b8471aa527 testing: fix some docstring issues
In preparation for enforcing some docstring lints.
2020-08-03 10:10:43 +03:00

12 lines
427 B
Python

"""Generate an executable with pytest runner embedded using PyInstaller."""
if __name__ == "__main__":
import pytest
import subprocess
hidden = []
for x in pytest.freeze_includes():
hidden.extend(["--hidden-import", x])
hidden.extend(["--hidden-import", "distutils"])
args = ["pyinstaller", "--noconfirm"] + hidden + ["runtests_script.py"]
subprocess.check_call(" ".join(args), shell=True)