Approve current output and fix the approval test reporter

Approved the 30 day fixture output as-is so there is a baseline before
refactoring. Conjured Mana Cake is still wrong here, that changes later.

The approval test was also crashing with "no reporter configuration"
instead of showing a diff. pytest-approvaltests 0.2.4 doesn't work with
approvaltests 19, so pass PythonNativeReporter directly.
This commit is contained in:
uzairarslan committed 2026-09-16 13:54:27 -04:00
1 parent d6407909c7
commit 5f113a1d2f
3 files changed
+386 -3

No files matched your search

+11 -3
View File
@@ -1,9 +1,16 @@
import io
import sys
from approvaltests import verify
from approvaltests import Options, verify
from approvaltests.reporters import PythonNativeReporter
from texttest_fixture import main
# Print the diff to stdout on a mismatch rather than launching a GUI diff tool,
# so the test behaves identically locally, headless and in CI.
REPORTER = PythonNativeReporter()
def test_gilded_rose_approvals():
orig_sysout = sys.stdout
try:
@@ -15,7 +22,8 @@ def test_gilded_rose_approvals():
finally:
sys.stdout = orig_sysout
verify(answer)
verify(answer, options=Options().with_reporter(REPORTER))
if __name__ == "__main__":
test_gilded_rose_approvals()
test_gilded_rose_approvals()