Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save MuellerSeb/c62c4e3eff2cb0f599aced8168d4a509 to your computer and use it in GitHub Desktop.
Save MuellerSeb/c62c4e3eff2cb0f599aced8168d4a509 to your computer and use it in GitHub Desktop.
pytest inplace run
if __name__ == "__main__":
from subprocess import Popen, PIPE
with Popen(
[
"pytest",
# '--tb=short', # shorter traceback format
# '--hypothesis-show-statistics',
str(__file__),
],
stdout=PIPE,
bufsize=1,
universal_newlines=True,
) as p:
for line in p.stdout:
print(line, end="")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment