Created
July 16, 2020 12:03
-
-
Save MuellerSeb/c62c4e3eff2cb0f599aced8168d4a509 to your computer and use it in GitHub Desktop.
pytest inplace run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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