From e82f08a2c9b9e99111548a15d68fda5a1fcedf55 Mon Sep 17 00:00:00 2001 From: Chris <Christopher.Happe@uni-duesseldorf.de> Date: Mon, 23 Nov 2020 09:38:15 +0100 Subject: [PATCH] Name Shadowing beendet --- info4/kapitel-8/Interpreter/test_loop_interpreter.py | 6 +++--- info4/kapitel-8/Interpreter/test_while_interpreter.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/info4/kapitel-8/Interpreter/test_loop_interpreter.py b/info4/kapitel-8/Interpreter/test_loop_interpreter.py index 125ffd9..fbcadba 100644 --- a/info4/kapitel-8/Interpreter/test_loop_interpreter.py +++ b/info4/kapitel-8/Interpreter/test_loop_interpreter.py @@ -234,15 +234,15 @@ class LOOPInterpreterTest(unittest.TestCase): self.assertEqual(interpret('x1:=x1-2;\n x0:=x1+2'), 2) @mock.patch('loopinterpreter.input', side_effect=input_exit) - def test_break_exit(self, input): + def test_break_exit(self, custom_input): self.assertEqual(interpret('x1:=2; BREAK x0:=2'), -1) self.assertEqual(interpret('LOOP x1 DO BREAK x2:= 2 END'), -1) @mock.patch('loopinterpreter.input', side_effect=input_continue) - def test_break_continue(self, input): + def test_break_continue(self, custom_input): self.assertEqual(interpret('x1:=2; LOOP x1 DO x0:=x0+2 BREAK END'), 4) @mock.patch('lexer.Lexer.__init__', init_without_tokens) def test_unknown_tokens(self): with self.assertRaises(SyntaxError): - interpret('BLIBLABLUB') \ No newline at end of file + interpret('BLIBLABLUB') diff --git a/info4/kapitel-8/Interpreter/test_while_interpreter.py b/info4/kapitel-8/Interpreter/test_while_interpreter.py index f326993..c446faf 100644 --- a/info4/kapitel-8/Interpreter/test_while_interpreter.py +++ b/info4/kapitel-8/Interpreter/test_while_interpreter.py @@ -116,5 +116,5 @@ class WHILEInterpreterTest(LOOPInterpreterTest): interpret('WHILE x1 != 0 DO x0:=2;;x2:=1 END') @mock.patch('whileinterpreter.input', side_effect=str_yes) - def test_infinite_loop(self, input): + def test_infinite_loop(self, custom_input): self.assertEqual(interpret('x1:=100000; WHILE x1 != 0 DO x0:=1; x1:=x1-1 END', 1), -1) -- GitLab