mirror of
https://github.com/emilybache/GildedRose-Refactoring-Kata.git
synced 2026-10-15 18:43:53 +00:00
Added approvals version of python test
This commit is contained in:
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()
|
||||
Reference in new issue
Block a user