From ecc8e5104426c19580f0475ca63fe8c522a2ff4e Mon Sep 17 00:00:00 2001 From: Mads Jensen Date: Sun, 3 Nov 2019 10:35:34 +0100 Subject: [PATCH] Remove empty overridden unittest.setUp and unittest.tearDown methods. --- test/units/errors/test_errors.py | 3 --- test/units/parsing/yaml/test_loader.py | 6 ------ test/units/playbook/test_block.py | 6 ------ test/units/playbook/test_play.py | 6 ------ test/units/template/test_safe_eval.py | 6 ------ test/units/template/test_template_utilities.py | 9 --------- 6 files changed, 36 deletions(-) diff --git a/test/units/errors/test_errors.py b/test/units/errors/test_errors.py index 5c595fcf279..ab5c19cdcdb 100644 --- a/test/units/errors/test_errors.py +++ b/test/units/errors/test_errors.py @@ -35,9 +35,6 @@ class TestErrors(unittest.TestCase): self.obj = AnsibleBaseYAMLObject() - def tearDown(self): - pass - def test_basic_error(self): e = AnsibleError(self.message) self.assertEqual(e.message, self.message) diff --git a/test/units/parsing/yaml/test_loader.py b/test/units/parsing/yaml/test_loader.py index 363ed0454bb..d6989f444b8 100644 --- a/test/units/parsing/yaml/test_loader.py +++ b/test/units/parsing/yaml/test_loader.py @@ -54,12 +54,6 @@ class NameStringIO(StringIO): class TestAnsibleLoaderBasic(unittest.TestCase): - def setUp(self): - pass - - def tearDown(self): - pass - def test_parse_number(self): stream = StringIO(u""" 1 diff --git a/test/units/playbook/test_block.py b/test/units/playbook/test_block.py index d88f40208cc..48471237930 100644 --- a/test/units/playbook/test_block.py +++ b/test/units/playbook/test_block.py @@ -26,12 +26,6 @@ from ansible.playbook.task import Task class TestBlock(unittest.TestCase): - def setUp(self): - pass - - def tearDown(self): - pass - def test_construct_empty_block(self): b = Block() diff --git a/test/units/playbook/test_play.py b/test/units/playbook/test_play.py index 7ca88b40b05..725c28eac47 100644 --- a/test/units/playbook/test_play.py +++ b/test/units/playbook/test_play.py @@ -31,12 +31,6 @@ from units.mock.path import mock_unfrackpath_noop class TestPlay(unittest.TestCase): - def setUp(self): - pass - - def tearDown(self): - pass - def test_empty_play(self): p = Play.load(dict()) self.assertEqual(str(p), '') diff --git a/test/units/template/test_safe_eval.py b/test/units/template/test_safe_eval.py index 8b62cb44771..89ff8a0e77b 100644 --- a/test/units/template/test_safe_eval.py +++ b/test/units/template/test_safe_eval.py @@ -28,12 +28,6 @@ from ansible.template.safe_eval import safe_eval class TestSafeEval(unittest.TestCase): - def setUp(self): - pass - - def tearDown(self): - pass - def test_safe_eval_usage(self): # test safe eval calls with different possible types for the # locals dictionary, to ensure we don't run into problems like diff --git a/test/units/template/test_template_utilities.py b/test/units/template/test_template_utilities.py index ad75572ed8a..8fe06059af4 100644 --- a/test/units/template/test_template_utilities.py +++ b/test/units/template/test_template_utilities.py @@ -74,9 +74,6 @@ class TestBackslashEscape(unittest.TestCase): def setUp(self): self.env = jinja2.Environment() - def tearDown(self): - pass - def test_backslash_escaping(self): for test in self.test_data: @@ -89,12 +86,6 @@ class TestBackslashEscape(unittest.TestCase): class TestCountNewlines(unittest.TestCase): - def setUp(self): - pass - - def tearDown(self): - pass - def test_zero_length_string(self): self.assertEquals(_count_newlines_from_end(u''), 0)