Added approvals version of python test

This commit is contained in:
emily committed 2025-06-22 17:30:00 +02:00
1 parent 69245fd714
commit 58a991fe27
8 files changed
+52 -14

No files matched your search

@@ -0,0 +1,21 @@
import io
import sys
from approvaltests import verify
from texttest_fixture import main
def test_gilded_rose_approvals():
orig_sysout = sys.stdout
try:
fake_stdout = io.StringIO()
sys.stdout = fake_stdout
sys.argv = ["texttest_fixture.py", 30]
main()
answer = fake_stdout.getvalue()
finally:
sys.stdout = orig_sysout
verify(answer)
if __name__ == "__main__":
test_gilded_rose_approvals()