summaryrefslogtreecommitdiff
path: root/yarns.webapp/900-implementations.yarn
diff options
context:
space:
mode:
Diffstat (limited to 'yarns.webapp/900-implementations.yarn')
-rw-r--r--yarns.webapp/900-implementations.yarn40
1 files changed, 20 insertions, 20 deletions
diff --git a/yarns.webapp/900-implementations.yarn b/yarns.webapp/900-implementations.yarn
index 06411a7..245cd73 100644
--- a/yarns.webapp/900-implementations.yarn
+++ b/yarns.webapp/900-implementations.yarn
@@ -86,7 +86,7 @@ most of the configuration.
IMPLEMENTS GIVEN (\S+) in (\S+) adds lorries (\S+) using prefix (\S+)
cd "$SRCDIR"/yarns.webapp
- python -c '
+ python3 -c '
import os
import yarnlib
@@ -112,7 +112,7 @@ most of the configuration.
IMPLEMENTS GIVEN (\S+) in (\S+) adds trove (\S+)
cd "$SRCDIR"/yarns.webapp
- python -c '
+ python3 -c '
import os
import yarnlib
@@ -138,7 +138,7 @@ file.
IMPLEMENTS GIVEN (\S+) in (\S+) has (\S+) set to (.+) for everything
cd "$SRCDIR"/yarns.webapp
- python -c '
+ python3 -c '
import os
import json
import yarnlib
@@ -159,7 +159,7 @@ Set a specific field for a `troves` section.
IMPLEMENTS GIVEN (\S+) in (\S+) sets (\S+) to (.+) for trove (\S+)
cd "$SRCDIR"/yarns.webapp
- python -c '
+ python3 -c '
import os
import json
import yarnlib
@@ -182,7 +182,7 @@ Remove a specified field for a `troves` section
IMPLEMENTS GIVEN (\S+) in (\S+) removes field (\S+) from trove (\S+)
cd "$SRCDIR"/yarns.webapp
- python -c '
+ python3 -c '
import os
import yarnlib
@@ -204,7 +204,7 @@ file. Note that the Trove must already be in the configuration file.
IMPLEMENTS GIVEN (\S+) in (\S+) has prefixmap (\S+):(\S+) for (\S+)
cd "$SRCDIR"/yarns.webapp
- python -c '
+ python3 -c '
import os
import yarnlib
@@ -242,7 +242,7 @@ Control the ls listing of a remote Trove.
echo "{}" > "$filename"
fi
cat "$filename"
- python -c '
+ python3 -c '
import json, os, sys
MATCH_2 = os.environ["MATCH_2"]
filename = sys.argv[1]
@@ -262,7 +262,7 @@ Remove a repository from the fake remote Trove.
echo "{}" > "$filename"
fi
cat "$filename"
- python -c '
+ python3 -c '
import json, os, sys
MATCH_2 = os.environ["MATCH_2"]
filename = sys.argv[1]
@@ -334,7 +334,7 @@ value is expresssed as a JSON value in the step.
IMPLEMENTS THEN response has (\S+) set to (.+)
cat "$DATADIR/response.body"
- python -c '
+ python3 -c '
import json, os, sys
data = json.load(sys.stdin)
key = os.environ["MATCH_1"]
@@ -353,22 +353,22 @@ we may need to look at a list of dicts, as below.
IMPLEMENTS THEN response has (\S+) item (\d+) field (\S+) set to (\S+)
cat "$DATADIR/response.body"
- python -c '
+ python3 -c '
import json, os, sys
data = json.load(sys.stdin)
- print "data:", repr(data)
+ print("data:", repr(data))
items = os.environ["MATCH_1"]
- print "items:", repr(items)
+ print("items:", repr(items))
item = int(os.environ["MATCH_2"])
- print "item:", repr(item)
+ print("item:", repr(item))
field = os.environ["MATCH_3"]
- print "field:", repr(field)
- print "match3:", repr(os.environ["MATCH_4"])
+ print("field:", repr(field))
+ print("match3:", repr(os.environ["MATCH_4"]))
expected = json.loads(os.environ["MATCH_4"])
- print "expected:", repr(expected)
- print "data[items]:", repr(data[items])
- print "data[items][item]:", repr(data[items][item])
- print "data[items][item][field]:", repr(data[items][item][field])
+ print("expected:", repr(expected))
+ print("data[items]:", repr(data[items]))
+ print("data[items][item]:", repr(data[items][item]))
+ print("data[items][item][field]:", repr(data[items][item][field]))
value = data[items][item][field]
if value != expected:
sys.stderr.write(
@@ -384,7 +384,7 @@ value, but we do care that it is there.
IMPLEMENTS THEN response has (\S+) set
cat "$DATADIR/response.body"
- python -c '
+ python3 -c '
import json, os, sys
data = json.load(sys.stdin)
key = os.environ["MATCH_1"]