summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2017-04-14 15:30:53 +0300
committerLars Wirzenius <liw@liw.fi>2017-04-14 15:44:12 +0300
commitcd5c2feed83b00f4f794d3e4df3acda9c4ba6a1f (patch)
treef5e3fdd18e3578bc97e4eab62c5a100583f79ac4
parent1b9b15fcc6d6eb102d0ae6ab6c3e694f8eeb98f5 (diff)
downloadvmdb2-cd5c2feed83b00f4f794d3e4df3acda9c4ba6a1f.tar.gz
Use get_next_match from yarnutils
-rw-r--r--yarns/900-implements.yarn14
1 files changed, 7 insertions, 7 deletions
diff --git a/yarns/900-implements.yarn b/yarns/900-implements.yarn
index f4c0538..6c10a14 100644
--- a/yarns/900-implements.yarn
+++ b/yarns/900-implements.yarn
@@ -4,12 +4,12 @@ IMPLEMENTS for all scenario steps
This chapter contains the implementations for all scenario steps.
IMPLEMENTS GIVEN a specification file called (\S+) containing (.+)
- filename = helper.get_next_match()
- spec = helper.get_next_match()
+ filename = get_next_match()
+ spec = get_next_match()
open(filename, 'w').write(spec)
IMPLEMENTS WHEN user runs vmdb2 (.*)
- args = helper.get_next_match()
+ args = get_next_match()
srcdir = os.environ['SRCDIR']
vmdb2 = os.path.join(srcdir, 'vmdb2')
exit, out, err = cliapp.runcmd_unchecked([vmdb2] + args.split())
@@ -18,7 +18,7 @@ This chapter contains the implementations for all scenario steps.
helper.set_variable('stderr', err)
IMPLEMENTS THEN exit code is (\d+)
- wanted = int(helper.get_next_match())
+ wanted = int(get_next_match())
exit = helper.get_variable('exit')
print 'exit code', exit
print 'stdout:', helper.get_variable('stdout')
@@ -26,8 +26,8 @@ This chapter contains the implementations for all scenario steps.
helper.assertEqual(exit, wanted)
IMPLEMENTS THEN stdout contains "(.+)" followed by "(.+)"
- first = helper.get_next_match()
- second = helper.get_next_match()
+ first = get_next_match()
+ second = get_next_match()
stdout = helper.get_variable('stdout')
first_i = stdout.find(first)
helper.assertGreaterThan(first_i, 0)
@@ -36,7 +36,7 @@ This chapter contains the implementations for all scenario steps.
helper.assertGreaterThan(second_i, -1)
IMPLEMENTS THEN stdout does NOT contain "(\S+)"
- what = helper.get_next_match()
+ what = get_next_match()
stdout = helper.get_variable('stdout')
i = stdout.find(what)
helper.assertEqual(i, -1)