summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2021-05-29 20:03:23 +0300
committerLars Wirzenius <liw@liw.fi>2021-05-29 20:03:23 +0300
commitc86686f2070a858726c700567c808b44b7c39163 (patch)
tree95a14e34e23df0a58a92254ffb5c01e1a1ca97b9
parent380d317d747e33a0b480158c9499baede74a7e67 (diff)
downloadoso-work-sample-c86686f2070a858726c700567c808b44b7c39163.tar.gz
fix: checking answer is expected
Implement the step. Sponsored-by: author
-rw-r--r--README.md8
-rw-r--r--oso.py5
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)