From c89cba031c8c3691e4f0873726afafd27b69b04f Mon Sep 17 00:00:00 2001 From: Lars Kruse <devel@sumpfralle.de> Date: Thu, 17 Feb 2022 02:20:52 +0100 Subject: [PATCH] style: remove unused variable assignments from tests These assignments caused style warnings (flake8). --- tests/test_engine_executor.py | 24 +++++++----------------- 1 file changed, 7 insertions(+), 17 deletions(-) diff --git a/tests/test_engine_executor.py b/tests/test_engine_executor.py index 267841d6..2ce535d6 100644 --- a/tests/test_engine_executor.py +++ b/tests/test_engine_executor.py @@ -42,7 +42,7 @@ class TestEngineExecutor(unittest.TestCase): global_state[0] = param # Before the executor is done there should be the initial value - e = EngineExecutor("RANDOM_NAMESPACE", None, due_time, f, "hello world") + EngineExecutor("RANDOM_NAMESPACE", None, due_time, f, "hello world") self.assertEqual("none", global_state[0]) self.assertNotEqual("hello world", global_state[0]) @@ -60,17 +60,13 @@ class TestEngineExecutor(unittest.TestCase): # Before the executor 1 is done there should be the initial value due_time1 = SU.timestamp() + 1 - e1 = EngineExecutor( - "EXECUTOR_1", None, due_time1, f, "hello world from executor 1" - ) + EngineExecutor("EXECUTOR_1", None, due_time1, f, "hello world from executor 1") self.assertEqual("none", global_state[0]) self.assertNotEqual("hello world from executor 1", global_state[0]) # Before the executor 2 is done there should be still the initial value due_time2 = SU.timestamp() + 0.5 - e2 = EngineExecutor( - "EXECUTOR_2", None, due_time2, f, "hello world from executor 2" - ) + EngineExecutor("EXECUTOR_2", None, due_time2, f, "hello world from executor 2") self.assertEqual("none", global_state[0]) self.assertNotEqual("hello world from executor 2", global_state[0]) @@ -103,9 +99,7 @@ class TestEngineExecutor(unittest.TestCase): # Before the the child is done there should be the initial value due_time2 = SU.timestamp() + 1 - child = EngineExecutor( - "EXECUTOR_CHILD", parent, due_time2, f, "hello world from child" - ) + EngineExecutor("EXECUTOR_CHILD", parent, due_time2, f, "hello world from child") self.assertEqual("none", global_state[0]) # After 0.3 seconds there still should be the initial value @@ -139,9 +133,7 @@ class TestEngineExecutor(unittest.TestCase): # Before the the child is done there should be the initial value due_time2 = SU.timestamp() + 1.5 - child = EngineExecutor( - "EXECUTOR_CHILD", parent, due_time2, f, "hello world from child" - ) + EngineExecutor("EXECUTOR_CHILD", parent, due_time2, f, "hello world from child") self.assertEqual("none", global_state[0]) # After 0.2 seconds there still should be the initial value @@ -192,9 +184,7 @@ class TestEngineExecutor(unittest.TestCase): # Before the the child is done there should be the initial value due_time2 = SU.timestamp() + 1.5 - child = EngineExecutor( - "EXECUTOR_CHILD", parent, due_time2, f, "hello world from child" - ) + EngineExecutor("EXECUTOR_CHILD", parent, due_time2, f, "hello world from child") self.assertEqual("none", global_state[0]) # There should be a total of 2 timers @@ -208,7 +198,7 @@ class TestEngineExecutor(unittest.TestCase): self.assertEqual("none", global_state[0]) # Before the the child is done there should be the initial value - child = EngineExecutor( + EngineExecutor( "EXECUTOR_CHILD", parent, due_time2, f, "hello world from alternative child" ) self.assertEqual("none", global_state[0]) -- GitLab