From c86686f2070a858726c700567c808b44b7c39163 Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Sat, 29 May 2021 20:03:23 +0300 Subject: fix: checking answer is expected Implement the step. Sponsored-by: author --- README.md | 8 ++++---- oso.py | 5 ++++- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 95a0b93..a1968b8 100644 --- a/README.md +++ b/README.md @@ -174,7 +174,7 @@ list of one. ~~~scenario given server when I run max-client.py 1 -then answer is 0 +then answer is 1 ~~~ ## Find max of a list of two @@ -188,7 +188,7 @@ two elements. ~~~scenario given server when I run max-client.py 5 5 -then answer is 0 +then answer is 5 ~~~ ### List of two numbers in order @@ -196,7 +196,7 @@ then answer is 0 ~~~scenario given server when I run max-client.py 5 6 -then answer is 0 +then answer is 6 ~~~ ### List of two numbers in wrong order @@ -204,7 +204,7 @@ then answer is 0 ~~~scenario given server when I run max-client.py 6 5 -then answer is 1 +then answer is 6 ~~~ diff --git a/oso.py b/oso.py index 2aaee76..0342b06 100644 --- a/oso.py +++ b/oso.py @@ -25,4 +25,7 @@ def stop_server(ctx): def answer_is(ctx, index): - pass + assert_eq = globals()["assert_eq"] + runcmd_get_stdout = globals()["runcmd_get_stdout"] + stdout = runcmd_get_stdout(ctx) + assert_eq(stdout.strip(), index) -- cgit v1.2.1