From a5e3d13adc7efcdfaeaf75f5dd965f80ff2f8296 Mon Sep 17 00:00:00 2001 From: Matt Clay Date: Wed, 22 Feb 2017 18:16:45 -0800 Subject: [PATCH] Remove shebangs from unit tests. --- test/units/contrib/inventory/test_vmware_inventory.py | 8 -------- test/units/mock/path.py | 2 -- test/units/module_utils/ec2/test_aws.py | 3 --- test/units/module_utils/gcp/test_auth.py | 4 ---- test/units/module_utils/gcp/test_utils.py | 5 ----- test/units/modules/cloud/amazon/test_s3.py | 4 ---- test/units/modules/cloud/google/test_gce_tag.py | 8 -------- test/units/modules/network/eos/test_eos_config.py | 5 ----- test/units/modules/network/eos/test_eos_eapi.py | 2 -- test/units/modules/network/eos/test_eos_system.py | 2 -- test/units/modules/network/iosxr/test_iosxr_system.py | 2 -- test/units/modules/network/vyos/test_vyos_system.py | 2 -- test/units/plugins/action/test_synchronize.py | 6 ------ test/units/plugins/connection/test_ssh.py | 1 - 14 files changed, 54 deletions(-) diff --git a/test/units/contrib/inventory/test_vmware_inventory.py b/test/units/contrib/inventory/test_vmware_inventory.py index d13332d93e8..b8572c12d51 100644 --- a/test/units/contrib/inventory/test_vmware_inventory.py +++ b/test/units/contrib/inventory/test_vmware_inventory.py @@ -1,5 +1,3 @@ -#!/usr/bin/env python - import json import os import pickle @@ -121,9 +119,3 @@ class TestVMWareInventory(unittest.TestCase): expected = json.dumps(expected, indent=2) #import epdb; epdb.st() assert showdata == expected - - - - -if __name__ == '__main__': - unittest.main() diff --git a/test/units/mock/path.py b/test/units/mock/path.py index f46b7c8a9d6..5b7957a69dd 100644 --- a/test/units/mock/path.py +++ b/test/units/mock/path.py @@ -1,5 +1,3 @@ -#!/usr/bin/env python - def mock_unfrackpath_noop(path): ''' Do not expand the path ''' return path diff --git a/test/units/module_utils/ec2/test_aws.py b/test/units/module_utils/ec2/test_aws.py index ba27c6cec4d..49b84d4789b 100644 --- a/test/units/module_utils/ec2/test_aws.py +++ b/test/units/module_utils/ec2/test_aws.py @@ -92,6 +92,3 @@ class RetryTestCase(unittest.TestCase): self.assertEqual(e.response['Error']['Code'], 'AuthFailure') self.assertEqual(self.counter, 1) - -if __name__ == '__main__': - unittest.main() diff --git a/test/units/module_utils/gcp/test_auth.py b/test/units/module_utils/gcp/test_auth.py index 5aa8049be26..7f58ea3fcd0 100644 --- a/test/units/module_utils/gcp/test_auth.py +++ b/test/units/module_utils/gcp/test_auth.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python # -*- coding: utf-8 -*- # (c) 2016, Tom Melendez # @@ -180,6 +179,3 @@ class GCPAuthTestCase(unittest.TestCase): expected = tuple(['my-sa-email', '/path/to/creds.json', 'my-project']) actual = _get_gcp_environment_credentials('my-sa-email', '/path/to/creds.json', None) self.assertEqual(expected, actual) - -if __name__ == '__main__': - unittest.main() diff --git a/test/units/module_utils/gcp/test_utils.py b/test/units/module_utils/gcp/test_utils.py index c536ff0ff1c..75795c9e1cb 100644 --- a/test/units/module_utils/gcp/test_utils.py +++ b/test/units/module_utils/gcp/test_utils.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python # -*- coding: utf-8 -*- # (c) 2016, Tom Melendez # @@ -35,7 +34,3 @@ class GCPUtilsTestCase(unittest.TestCase): self.assertTrue(check_min_pkg_version('foobar', '0.4.0')) self.assertTrue(check_min_pkg_version('foobar', '0.5.0')) self.assertFalse(check_min_pkg_version('foobar', '0.6.0')) - - -if __name__ == '__main__': - unittest.main() diff --git a/test/units/modules/cloud/amazon/test_s3.py b/test/units/modules/cloud/amazon/test_s3.py index 4c50a242e9b..25d1a3e39a8 100644 --- a/test/units/modules/cloud/amazon/test_s3.py +++ b/test/units/modules/cloud/amazon/test_s3.py @@ -40,7 +40,3 @@ class TestUrlparse(unittest.TestCase): s3_url="http://bla.blubb" actual = s3.get_s3_connection(aws_connect_kwargs, location, rgw, s3_url) self.assertEqual("bla.blubb", actual.host) - - -if __name__ == '__main__': - unittest.main() diff --git a/test/units/modules/cloud/google/test_gce_tag.py b/test/units/modules/cloud/google/test_gce_tag.py index 81973b71f88..0b842d56b03 100644 --- a/test/units/modules/cloud/google/test_gce_tag.py +++ b/test/units/modules/cloud/google/test_gce_tag.py @@ -1,5 +1,3 @@ -#!/usr/bin/env python - import unittest from ansible.modules.cloud.google.gce_tag import _get_changed_items, _intersect_items, _union_items @@ -60,9 +58,3 @@ class TestGCETag(unittest.TestCase): want = ['three'] got = _get_changed_items(existing_tags, tags_to_remove) self.assertEqual(want, got) - -if __name__ == '__main__': - unittest.main() - - - diff --git a/test/units/modules/network/eos/test_eos_config.py b/test/units/modules/network/eos/test_eos_config.py index a42b5ddf05c..d1791537e77 100644 --- a/test/units/modules/network/eos/test_eos_config.py +++ b/test/units/modules/network/eos/test_eos_config.py @@ -1,5 +1,3 @@ -#!/usr/bin/env python -# # (c) 2016 Red Hat Inc. # # This file is part of Ansible @@ -134,6 +132,3 @@ class TestEosConfigModule(TestEosModule): set_module_args(args) result = self.execute_module() self.assertIn('__backup__', result) - - - diff --git a/test/units/modules/network/eos/test_eos_eapi.py b/test/units/modules/network/eos/test_eos_eapi.py index a55ccebf8f8..b792367441a 100644 --- a/test/units/modules/network/eos/test_eos_eapi.py +++ b/test/units/modules/network/eos/test_eos_eapi.py @@ -1,5 +1,3 @@ -#!/usr/bin/env python -# # (c) 2016 Red Hat Inc. # # This file is part of Ansible diff --git a/test/units/modules/network/eos/test_eos_system.py b/test/units/modules/network/eos/test_eos_system.py index 4b866033e50..80937aa362f 100644 --- a/test/units/modules/network/eos/test_eos_system.py +++ b/test/units/modules/network/eos/test_eos_system.py @@ -1,5 +1,3 @@ -#!/usr/bin/env python -# # (c) 2016 Red Hat Inc. # # This file is part of Ansible diff --git a/test/units/modules/network/iosxr/test_iosxr_system.py b/test/units/modules/network/iosxr/test_iosxr_system.py index c35cc208702..0013c303f5c 100644 --- a/test/units/modules/network/iosxr/test_iosxr_system.py +++ b/test/units/modules/network/iosxr/test_iosxr_system.py @@ -1,5 +1,3 @@ -#!/usr/bin/env python -# # (c) 2016 Red Hat Inc. # # This file is part of Ansible diff --git a/test/units/modules/network/vyos/test_vyos_system.py b/test/units/modules/network/vyos/test_vyos_system.py index a2715903ce5..2e2c2f2a7b6 100644 --- a/test/units/modules/network/vyos/test_vyos_system.py +++ b/test/units/modules/network/vyos/test_vyos_system.py @@ -1,5 +1,3 @@ -#!/usr/bin/env python -# # (c) 2016 Red Hat Inc. # # This file is part of Ansible diff --git a/test/units/plugins/action/test_synchronize.py b/test/units/plugins/action/test_synchronize.py index 0d20da29c54..17c8e484fe3 100644 --- a/test/units/plugins/action/test_synchronize.py +++ b/test/units/plugins/action/test_synchronize.py @@ -1,5 +1,3 @@ -#!/usr/bin/env python - ''' (Epdb) pprint(DeepDiff(self.final_task_vars, out_task_vars), indent=2) { 'dic_item_added': set([u"root['ansible_python_interpreter']"]), @@ -243,7 +241,3 @@ class TestSynchronizeAction(unittest.TestCase): # delegate to other remote host with su enabled x = SynchronizeTester() x.runtest(fixturepath=os.path.join(self.fixturedir,'delegate_remote_su')) - - -if __name__ == "__main__": - SynchronizeTester().runtest() diff --git a/test/units/plugins/connection/test_ssh.py b/test/units/plugins/connection/test_ssh.py index 9ca4373c752..a9e2107fb00 100644 --- a/test/units/plugins/connection/test_ssh.py +++ b/test/units/plugins/connection/test_ssh.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python # -*- coding: utf-8 -*- # (c) 2015, Toshio Kuratomi #