From 44f5b81e612fc9c0b94824fb906abf2666ab3d8f Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Thu, 13 Apr 2017 21:54:06 +0300 Subject: Drop unnecessarey creation of YarnHelper objects --- 900-implements.yarn | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/900-implements.yarn b/900-implements.yarn index 72427a5..31cec0c 100644 --- a/900-implements.yarn +++ b/900-implements.yarn @@ -16,13 +16,11 @@ vars['http_body'] = body IMPLEMENTS THEN HTTP status is (\d+) - h = yarnhelper.YarnHelper() expected = vars['http_status'] actual = int(get_next_match()) assertEqual(expected, actual) IMPLEMENTS THEN HTTP body matches "(.*)" - h = yarnhelper.YarnHelper() body = vars['http_body'] sys.stdout.write('Body:\n{}'.format(repr(body))) pattern = get_next_match() @@ -32,7 +30,6 @@ ## Running commands and checking results IMPLEMENTS WHEN user runs Gitano (.*) - h = yarnhelper.YarnHelper() address = os.environ['ADDRESS'] cmd = get_next_match() argv = ['ssh', 'git@' + address] + cmd.split() @@ -43,7 +40,6 @@ vars['stderr'] = err IMPLEMENTS WHEN user clones the (\S+) repository over git:// - h = yarnhelper.YarnHelper() address = os.environ['ADDRESS'] repo = get_next_match() url = 'git://{}/{}'.format(address, repo) @@ -55,12 +51,10 @@ vars['stderr'] = err IMPLEMENTS THEN exit code is (\d+) - h = yarnhelper.YarnHelper() code = get_next_match() assertEqual(vars['exit'], int(code)) IMPLEMENTS THEN standard output matches "(.+)" - h = yarnhelper.YarnHelper() pattern = get_next_match() stdout = vars['stdout'] m = re.search(pattern, stdout) @@ -70,7 +64,6 @@ assertNotEqual(m, None) IMPLEMENTS THEN standard error matches "(.+)" - h = yarnhelper.YarnHelper() pattern = get_next_match() stderr = vars['stderr'] m = re.search(pattern, stderr) @@ -84,7 +77,6 @@ ## Generate a random number IMPLEMENTS GIVEN large random number (\S+) - h = yarnhelper.YarnHelper() varname = get_next_match() mini = 2**32 maxi = 2**64 @@ -96,7 +88,6 @@ IMPLEMENTS WHEN someone sends mail to (\S+) with subject \$(\S+) import smtplib - h = yarnhelper.YarnHelper() to_addr = get_next_match() subject_key = get_next_match() subject = vars[subject_key] @@ -152,12 +143,10 @@ ## Run sequence of SMTP commands, check SMTP status IMPLEMENTS WHEN client SMTP authenticates as (\S+) - h = yarnhelper.YarnHelper() user = get_next_match() vars['smtp_username'] = user IMPLEMENTS WHEN client sends (.*) - h = yarnhelper.YarnHelper() command = get_next_match() smtp_commands = vars['smtp_commands'] if smtp_commands is None: -- cgit v1.2.1