Remove main() and __main__ from tests. 77/47677/8
authorEmma Foley <emma.l.foley@intel.com>
Thu, 23 Nov 2017 00:00:47 +0000 (00:00 +0000)
committerEmma Foley <emma.l.foley@intel.com>
Fri, 2 Mar 2018 16:52:36 +0000 (16:52 +0000)
Removes the unnecessary main() functions from tests.
Also removes shebang (#!) where it appears at the top of files.
JIRA: YARDSTICK-861

Change-Id: I79180d1eb9c5bce640142dd62ce28c7437c1b210
Signed-off-by: Emma Foley <emma.l.foley@intel.com>
120 files changed:
tests/unit/network_services/collector/test_publisher.py
tests/unit/network_services/collector/test_subscriber.py
tests/unit/network_services/helpers/test_cpu.py
tests/unit/network_services/helpers/test_dpdkbindnic_helper.py
tests/unit/network_services/helpers/test_samplevnf_helper.py
tests/unit/network_services/libs/ixia_libs/test_IxNet.py
tests/unit/network_services/nfvi/test_resource.py
tests/unit/network_services/traffic_profile/test_base.py
tests/unit/network_services/traffic_profile/test_fixed.py
tests/unit/network_services/traffic_profile/test_http.py
tests/unit/network_services/traffic_profile/test_ixia_rfc2544.py
tests/unit/network_services/traffic_profile/test_rfc2544.py
tests/unit/network_services/traffic_profile/test_trex_traffic_profile.py
tests/unit/network_services/vnf_generic/test_vnfdgen.py
tests/unit/network_services/vnf_generic/vnf/test_acl_vnf.py
tests/unit/network_services/vnf_generic/vnf/test_base.py
tests/unit/network_services/vnf_generic/vnf/test_cgnapt_vnf.py
tests/unit/network_services/vnf_generic/vnf/test_prox_helpers.py
tests/unit/network_services/vnf_generic/vnf/test_prox_vnf.py
tests/unit/network_services/vnf_generic/vnf/test_router_vnf.py
tests/unit/network_services/vnf_generic/vnf/test_sample_vnf.py
tests/unit/network_services/vnf_generic/vnf/test_tg_ping.py
tests/unit/network_services/vnf_generic/vnf/test_tg_rfc2544_ixia.py
tests/unit/network_services/vnf_generic/vnf/test_tg_rfc2544_trex.py
tests/unit/network_services/vnf_generic/vnf/test_tg_trex.py
tests/unit/network_services/vnf_generic/vnf/test_udp_replay.py
tests/unit/network_services/vnf_generic/vnf/test_vfw_vnf.py
tests/unit/network_services/vnf_generic/vnf/test_vpe_vnf.py
yardstick/tests/unit/apiserver/resources/test_env_action.py
yardstick/tests/unit/apiserver/utils/test_influx.py
yardstick/tests/unit/benchmark/contexts/test_heat.py
yardstick/tests/unit/benchmark/contexts/test_kubernetes.py
yardstick/tests/unit/benchmark/contexts/test_model.py
yardstick/tests/unit/benchmark/core/test_report.py
yardstick/tests/unit/benchmark/core/test_testcase.py
yardstick/tests/unit/benchmark/runner/test_base.py
yardstick/tests/unit/benchmark/scenarios/availability/test_attacker_baremetal.py
yardstick/tests/unit/benchmark/scenarios/availability/test_attacker_general.py
yardstick/tests/unit/benchmark/scenarios/availability/test_attacker_process.py
yardstick/tests/unit/benchmark/scenarios/availability/test_basemonitor.py
yardstick/tests/unit/benchmark/scenarios/availability/test_baseresultchecker.py
yardstick/tests/unit/benchmark/scenarios/availability/test_director.py
yardstick/tests/unit/benchmark/scenarios/availability/test_monitor_general.py
yardstick/tests/unit/benchmark/scenarios/availability/test_monitor_multi.py
yardstick/tests/unit/benchmark/scenarios/availability/test_monitor_process.py
yardstick/tests/unit/benchmark/scenarios/availability/test_operation_general.py
yardstick/tests/unit/benchmark/scenarios/availability/test_result_checker_general.py
yardstick/tests/unit/benchmark/scenarios/availability/test_util.py
yardstick/tests/unit/benchmark/scenarios/compute/test_cachestat.py
yardstick/tests/unit/benchmark/scenarios/compute/test_computecapacity.py
yardstick/tests/unit/benchmark/scenarios/compute/test_cpuload.py
yardstick/tests/unit/benchmark/scenarios/compute/test_cyclictest.py
yardstick/tests/unit/benchmark/scenarios/compute/test_lmbench.py
yardstick/tests/unit/benchmark/scenarios/compute/test_memload.py
yardstick/tests/unit/benchmark/scenarios/compute/test_plugintest.py
yardstick/tests/unit/benchmark/scenarios/compute/test_qemumigrate.py
yardstick/tests/unit/benchmark/scenarios/compute/test_ramspeed.py
yardstick/tests/unit/benchmark/scenarios/compute/test_spec_cpu.py
yardstick/tests/unit/benchmark/scenarios/compute/test_spec_cpu_for_vm.py
yardstick/tests/unit/benchmark/scenarios/compute/test_unixbench.py
yardstick/tests/unit/benchmark/scenarios/dummy/test_dummy.py
yardstick/tests/unit/benchmark/scenarios/lib/test_add_memory_load.py
yardstick/tests/unit/benchmark/scenarios/lib/test_attach_volume.py
yardstick/tests/unit/benchmark/scenarios/lib/test_check_connectivity.py
yardstick/tests/unit/benchmark/scenarios/lib/test_check_numa_info.py
yardstick/tests/unit/benchmark/scenarios/lib/test_check_value.py
yardstick/tests/unit/benchmark/scenarios/lib/test_create_flavor.py
yardstick/tests/unit/benchmark/scenarios/lib/test_create_image.py
yardstick/tests/unit/benchmark/scenarios/lib/test_create_keypair.py
yardstick/tests/unit/benchmark/scenarios/lib/test_create_network.py
yardstick/tests/unit/benchmark/scenarios/lib/test_create_port.py
yardstick/tests/unit/benchmark/scenarios/lib/test_create_router.py
yardstick/tests/unit/benchmark/scenarios/lib/test_create_sec_group.py
yardstick/tests/unit/benchmark/scenarios/lib/test_create_server.py
yardstick/tests/unit/benchmark/scenarios/lib/test_create_subnet.py
yardstick/tests/unit/benchmark/scenarios/lib/test_create_volume.py
yardstick/tests/unit/benchmark/scenarios/lib/test_delete_flavor.py
yardstick/tests/unit/benchmark/scenarios/lib/test_delete_floating_ip.py
yardstick/tests/unit/benchmark/scenarios/lib/test_delete_image.py
yardstick/tests/unit/benchmark/scenarios/lib/test_delete_keypair.py
yardstick/tests/unit/benchmark/scenarios/lib/test_delete_port.py
yardstick/tests/unit/benchmark/scenarios/lib/test_delete_router.py
yardstick/tests/unit/benchmark/scenarios/lib/test_delete_router_gateway.py
yardstick/tests/unit/benchmark/scenarios/lib/test_delete_router_interface.py
yardstick/tests/unit/benchmark/scenarios/lib/test_delete_server.py
yardstick/tests/unit/benchmark/scenarios/lib/test_delete_volume.py
yardstick/tests/unit/benchmark/scenarios/lib/test_detach_volume.py
yardstick/tests/unit/benchmark/scenarios/lib/test_get_flavor.py
yardstick/tests/unit/benchmark/scenarios/lib/test_get_migrate_target_host.py
yardstick/tests/unit/benchmark/scenarios/lib/test_get_numa_info.py
yardstick/tests/unit/benchmark/scenarios/lib/test_get_server.py
yardstick/tests/unit/benchmark/scenarios/lib/test_get_server_ip.py
yardstick/tests/unit/benchmark/scenarios/networking/test_iperf3.py
yardstick/tests/unit/benchmark/scenarios/networking/test_netperf.py
yardstick/tests/unit/benchmark/scenarios/networking/test_netperf_node.py
yardstick/tests/unit/benchmark/scenarios/networking/test_netutilization.py
yardstick/tests/unit/benchmark/scenarios/networking/test_networkcapacity.py
yardstick/tests/unit/benchmark/scenarios/networking/test_nstat.py
yardstick/tests/unit/benchmark/scenarios/networking/test_ping.py
yardstick/tests/unit/benchmark/scenarios/networking/test_ping6.py
yardstick/tests/unit/benchmark/scenarios/networking/test_pktgen.py
yardstick/tests/unit/benchmark/scenarios/networking/test_pktgen_dpdk.py
yardstick/tests/unit/benchmark/scenarios/networking/test_pktgen_dpdk_throughput.py
yardstick/tests/unit/benchmark/scenarios/networking/test_sfc.py
yardstick/tests/unit/benchmark/scenarios/networking/test_vsperf.py
yardstick/tests/unit/benchmark/scenarios/networking/test_vsperf_dpdk.py
yardstick/tests/unit/benchmark/scenarios/parser/test_parser.py
yardstick/tests/unit/benchmark/scenarios/storage/test_bonnie.py
yardstick/tests/unit/benchmark/scenarios/storage/test_fio.py
yardstick/tests/unit/benchmark/scenarios/storage/test_storagecapacity.py
yardstick/tests/unit/benchmark/scenarios/storage/test_storperf.py
yardstick/tests/unit/common/test_httpClient.py
yardstick/tests/unit/common/test_template_format.py
yardstick/tests/unit/common/test_yaml_loader.py
yardstick/tests/unit/dispatcher/test_influxdb.py
yardstick/tests/unit/orchestrator/test_kubernetes.py
yardstick/tests/unit/test_cmd/commands/test_env.py
yardstick/tests/unit/test_cmd/commands/test_testcase.py
yardstick/tests/unit/test_cmd/test_NSBperf.py
yardstick/tests/unit/test_ssh.py

index d1e56e1..4a17584 100644 (file)
@@ -1,5 +1,3 @@
-#!/usr/bin/env python
-
 # Copyright (c) 2016-2017 Intel Corporation
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
index f324f62..d4b4ecf 100644 (file)
@@ -1,5 +1,3 @@
-#!/usr/bin/env python
-
 # Copyright (c) 2016-2017 Intel Corporation
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
index 7ea6bd0..1f9d3f2 100644 (file)
@@ -1,5 +1,3 @@
-#!/usr/bin/env python
-
 # Copyright (c) 2016-2017 Intel Corporation
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
index cc98064..367072e 100644 (file)
@@ -1,5 +1,3 @@
-#!/usr/bin/env python
-
 # Copyright (c) 2016-2017 Intel Corporation
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
index 48dfb5f..3b6c89d 100644 (file)
@@ -1,5 +1,3 @@
-#!/usr/bin/env python
-
 # Copyright (c) 2016-2017 Intel Corporation
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
index 3f374fb..2a97048 100644 (file)
@@ -1,5 +1,3 @@
-#!/usr/bin/env python
-
 # Copyright (c) 2016-2017 Intel Corporation
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
@@ -36,7 +34,7 @@ class TestIxNextgen(unittest.TestCase):
         self.assertIsNone(ixnet_gen._bidir)
 
     @mock.patch("yardstick.network_services.libs.ixia_libs.IxNet.IxNet.sys")
-    def test_connect(self, mock_sys):
+    def test_connect(self, *args):
 
         ixnet_gen = IxNextgen()
         ixnet_gen.get_config = mock.MagicMock()
index d5280ea..f5f7f0f 100644 (file)
@@ -271,6 +271,3 @@ class TestResourceProfile(unittest.TestCase):
         # TODO(efoley): Fix this incorrect test.
         # Should check that we don't try to stop amqp when it's not running
         self.assertIsNone(self.resource_profile.stop())
-
-if __name__ == '__main__':
-    unittest.main()
index 33f8032..3b88049 100644 (file)
@@ -1,5 +1,3 @@
-#!/usr/bin/env python
-
 # Copyright (c) 2016-2017 Intel Corporation
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
index 911889d..dec9496 100644 (file)
@@ -1,5 +1,3 @@
-#!/usr/bin/env python
-
 # Copyright (c) 2016-2017 Intel Corporation
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
index c102c79..5d8029e 100644 (file)
@@ -1,5 +1,3 @@
-#!/usr/bin/env python
-
 # Copyright (c) 2016-2017 Intel Corporation
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
index 75e41eb..e8910d6 100644 (file)
@@ -1,5 +1,3 @@
-#!/usr/bin/env python
-
 # Copyright (c) 2016-2017 Intel Corporation
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
@@ -611,7 +609,3 @@ class TestIXIARFC2544Profile(unittest.TestCase):
         r_f_c2544_profile._ixia_traffic_generate = mock.Mock()
         self.assertIsNone(
             r_f_c2544_profile.start_ixia_latency(traffic_generator, ixia_obj))
-
-
-if __name__ == '__main__':
-    unittest.main()
index e62f192..21c8f6d 100644 (file)
@@ -1,5 +1,3 @@
-#!/usr/bin/env python
-
 # Copyright (c) 2016-2017 Intel Corporation
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
index 95a962d..d1009a5 100644 (file)
@@ -1,5 +1,3 @@
-#!/usr/bin/env python
-
 # Copyright (c) 2016-2017 Intel Corporation
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
index ee881c9..2ab1412 100644 (file)
@@ -1,5 +1,3 @@
-#!/usr/bin/env python
-
 # Copyright (c) 2016-2017 Intel Corporation
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
index ea6fa0e..2971b55 100644 (file)
@@ -1,5 +1,3 @@
-#!/usr/bin/env python
-
 # Copyright (c) 2016-2017 Intel Corporation
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
index ba52e53..664373f 100644 (file)
@@ -1,5 +1,3 @@
-#!/usr/bin/env python
-
 # Copyright (c) 2016-2017 Intel Corporation
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
index 62b3c74..edaa0ad 100644 (file)
@@ -1,5 +1,3 @@
-#!/usr/bin/env python
-
 # Copyright (c) 2016-2017 Intel Corporation
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
index ce90518..faceeb6 100644 (file)
@@ -1,5 +1,3 @@
-#!/usr/bin/env python
-
 # Copyright (c) 2016-2017 Intel Corporation
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
index 46786a3..159b1f7 100644 (file)
@@ -1,5 +1,3 @@
-#!/usr/bin/env python
-
 # Copyright (c) 2016-2017 Intel Corporation
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
index 21e6c59..c6292f2 100644 (file)
@@ -1,5 +1,3 @@
-#!/usr/bin/env python
-
 # Copyright (c) 2016-2017 Intel Corporation
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
@@ -262,6 +260,3 @@ class TestRouterVNF(unittest.TestCase):
         router_vnf._vnf_process = mock.MagicMock()
         router_vnf._vnf_process.terminate = mock.Mock()
         self.assertIsNone(router_vnf.terminate())
-
-if __name__ == '__main__':
-    unittest.main()
index b2e3fd8..c7d2abc 100644 (file)
@@ -1,5 +1,3 @@
-#!/usr/bin/env python
-
 # Copyright (c) 2017-2018 Intel Corporation
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
index ed2274e..91a353d 100644 (file)
@@ -1,5 +1,3 @@
-#!/usr/bin/env python
-
 # Copyright (c) 2016-2017 Intel Corporation
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
index 3903901..61fc012 100644 (file)
@@ -1,5 +1,3 @@
-#!/usr/bin/env python
-
 # Copyright (c) 2016-2017 Intel Corporation
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
index 7342cfc..b9a95a9 100644 (file)
@@ -1,5 +1,3 @@
-#!/usr/bin/env python
-
 # Copyright (c) 2016-2017 Intel Corporation
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
index 6180715..f80d1f9 100644 (file)
@@ -1,5 +1,3 @@
-#!/usr/bin/env python
-
 # Copyright (c) 2016-2017 Intel Corporation
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
@@ -483,7 +481,3 @@ class TestTrexTrafficGen(unittest.TestCase):
         client = mock.Mock(autospec=STLClient)
         client.connect = mock.Mock(return_value=0)
         self.assertIsNotNone(trex_traffic_gen.resource_helper._connect(client))
-
-
-if __name__ == '__main__':
-    unittest.main()
index 472052b..4cf4320 100644 (file)
@@ -1,5 +1,3 @@
-#!/usr/bin/env python
-
 # Copyright (c) 2016-2017 Intel Corporation
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
index f2eca19..48fc87e 100644 (file)
@@ -1,5 +1,3 @@
-#!/usr/bin/env python
-
 # Copyright (c) 2016-2017 Intel Corporation
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
index c074dfb..8c45d97 100644 (file)
@@ -1,5 +1,3 @@
-#!/usr/bin/env python
-
 # Copyright (c) 2016-2017 Intel Corporation
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
index cf646a2..6578416 100644 (file)
@@ -33,11 +33,3 @@ class EnvTestCase(APITestCase):
         time.sleep(0)
 
         self.assertIn(u'status', resp)
-
-
-def main():
-    unittest.main()
-
-
-if __name__ == '__main__':
-    main()
index 883608b..dce6c1c 100644 (file)
@@ -50,11 +50,3 @@ class QueryTestCase(unittest.TestCase):
             influx.query(sql)
         except Exception as e:  # pylint: disable=broad-except
             self.assertIsInstance(e, RuntimeError)
-
-
-def main():
-    unittest.main()
-
-
-if __name__ == '__main__':
-    main()
index c449b2a..f2d744f 100644 (file)
@@ -1,5 +1,3 @@
-#!/usr/bin/env python
-
 ##############################################################################
 # Copyright (c) 2015 Ericsson AB and others.
 #
index 73c59c1..22153e4 100644 (file)
@@ -167,11 +167,3 @@ class KubernetesTestCase(unittest.TestCase):
     def test_delete_services(self, mock_delete):
         self.k8s_context._delete_services()
         self.assertTrue(mock_delete.called)
-
-
-def main():
-    unittest.main()
-
-
-if __name__ == '__main__':
-    main()
index 28011d4..76c4da5 100644 (file)
@@ -1,5 +1,3 @@
-#!/usr/bin/env python
-
 ##############################################################################
 # Copyright (c) 2015 Ericsson AB and others.
 #
index 3d9a503..a684ad7 100644 (file)
@@ -1,5 +1,3 @@
-#!/usr/bin/env python
-
 ##############################################################################
 # Copyright (c) 2017 Rajesh Kudaka.
 #
index 1f5aad7..1194658 100644 (file)
@@ -1,5 +1,3 @@
-#!/usr/bin/env python
-
 ##############################################################################
 # Copyright (c) 2015 Huawei Technologies Co.,Ltd and others.
 #
@@ -35,11 +33,3 @@ class TestcaseUT(unittest.TestCase):
         casename = Arg()
         result = t.show(casename)
         self.assertTrue(result)
-
-
-def main():
-    unittest.main()
-
-
-if __name__ == '__main__':
-    main()
index 59739c5..727207f 100644 (file)
@@ -90,11 +90,3 @@ class RunnerTestCase(unittest.TestCase):
 
         with self.assertRaises(NotImplementedError):
             runner._run_benchmark(mock.Mock(), mock.Mock(), mock.Mock(), mock.Mock())
-
-
-def main():
-    unittest.main()
-
-
-if __name__ == '__main__':
-    main()
index f0921c0..d5c95a0 100644 (file)
@@ -1,5 +1,3 @@
-#!/usr/bin/env python
-
 ##############################################################################
 # Copyright (c) 2015 Huawei Technologies Co.,Ltd and others.
 #
index 612b5a6..c1b3c0d 100644 (file)
@@ -1,5 +1,3 @@
-#!/usr/bin/env python
-
 ##############################################################################
 # Copyright (c) 2016 Juan Qiu and others
 # juan_ qiu@tongji.edu.cn
index 0a8e832..2e9f1c6 100644 (file)
@@ -1,5 +1,3 @@
-#!/usr/bin/env python
-
 ##############################################################################
 # Copyright (c) 2015 Huawei Technologies Co.,Ltd and others.
 #
index 9bc04eb..ce97277 100644 (file)
@@ -113,7 +113,3 @@ class BaseMonitorTestCase(unittest.TestCase):
         except Exception:  # pylint: disable=broad-except
             pass
         self.assertIsNone(cls)
-
-
-if __name__ == "__main__":
-    unittest.main()
index ae74d24..d4df028 100644 (file)
@@ -1,5 +1,3 @@
-#!/usr/bin/env python
-
 ##############################################################################
 # Copyright (c) 2016 Huan Li and others
 # lihuansse@tongji.edu.cn
index 72ce7b0..e49544e 100644 (file)
@@ -1,5 +1,3 @@
-#!/usr/bin/env python
-
 ##############################################################################
 # Copyright (c) 2016 Huan Li and others
 # lihuansse@tongji.edu.cn
index 7022ea6..5907c8b 100644 (file)
@@ -1,5 +1,3 @@
-#!/usr/bin/env python
-
 ##############################################################################
 # Copyright (c) 2016 Huan Li and others
 # lihuansse@tongji.edu.cn
index 0d61d9b..e9c6802 100644 (file)
@@ -1,5 +1,3 @@
-#!/usr/bin/env python
-
 ##############################################################################
 # Copyright (c) 2016 Huan Li and others
 # lihuansse@tongji.edu.cn
index 41ce544..a6d2ca3 100644 (file)
@@ -1,5 +1,3 @@
-#!/usr/bin/env python
-
 ##############################################################################
 # Copyright (c) 2015 Huawei Technologies Co.,Ltd and others.
 #
index a965f7f..2b09c03 100644 (file)
@@ -1,5 +1,3 @@
-#!/usr/bin/env python
-
 ##############################################################################
 # Copyright (c) 2016 Huan Li and others
 # lihuansse@tongji.edu.cn
index 234adcb..324a5bd 100644 (file)
@@ -1,5 +1,3 @@
-#!/usr/bin/env python
-
 ##############################################################################
 # Copyright (c) 2016 Huan Li and others
 # lihuansse@tongji.edu.cn
index 548efe9..4d97585 100644 (file)
@@ -1,5 +1,3 @@
-#!/usr/bin/env python
-
 ##############################################################################
 # Copyright (c) 2016 Kanglin Yin and others
 # 14_ykl@tongji.edu.cn
index b0ddfc6..6f66c30 100644 (file)
@@ -1,5 +1,3 @@
-#!/usr/bin/env python
-
 ##############################################################################
 # Copyright (c) 2016 Huawei Technologies Co.,Ltd and others.
 #
index 7b9a5ad..4bef589 100644 (file)
@@ -1,5 +1,3 @@
-#!/usr/bin/env python
-
 ##############################################################################
 # Copyright (c) 2016 Huawei Technologies Co.,Ltd and others.
 #
index 840ac78..da6e6a2 100644 (file)
@@ -1,5 +1,3 @@
-#!/usr/bin/env python
-
 ##############################################################################
 # Copyright (c) 2015 Ericsson AB and others.
 #
index 51ffd24..f24ec24 100644 (file)
@@ -1,5 +1,3 @@
-#!/usr/bin/env python
-
 ##############################################################################
 # Copyright (c) 2015 Huawei Technologies Co.,Ltd and other.
 #
@@ -166,10 +164,3 @@ class CyclictestTestCase(unittest.TestCase):
 
         mock_ssh.SSH.from_node().execute.return_value = (1, '', 'FOOBAR')
         self.assertRaises(RuntimeError, c.run, result)
-
-
-def main():
-    unittest.main()
-
-if __name__ == '__main__':
-    main()
index b3152d1..9640ce0 100644 (file)
@@ -1,5 +1,3 @@
-#!/usr/bin/env python
-
 ##############################################################################
 # Copyright (c) 2015 Ericsson AB and others.
 #
@@ -193,10 +191,3 @@ class LmbenchTestCase(unittest.TestCase):
 
         mock_ssh.SSH.from_node().execute.return_value = (1, '', 'FOOBAR')
         self.assertRaises(RuntimeError, l.run, self.result)
-
-
-def main():
-    unittest.main()
-
-if __name__ == '__main__':
-    main()
index ebae999..8213d44 100644 (file)
@@ -1,5 +1,3 @@
-#!/usr/bin/env python
-
 ##############################################################################
 # Copyright (c) 2016 Huawei Technologies Co.,Ltd and others.
 #
@@ -109,11 +107,3 @@ class MEMLoadTestCase(unittest.TestCase):
         with open(output) as f:
             sample_output = f.read()
         return sample_output
-
-
-def main():
-    unittest.main()
-
-
-if __name__ == '__main__':
-    main()
index 680f6ad..8753017 100644 (file)
@@ -1,5 +1,3 @@
-#!/usr/bin/env python
-
 ##############################################################################
 # Copyright (c) 2016 Huawei Technologies Co.,Ltd and others.
 #
index 26a26cd..03003d0 100644 (file)
@@ -1,5 +1,3 @@
-#!/usr/bin/env python
-
 ##############################################################################
 # Copyright (c) 2015 Huawei Technologies Co.,Ltd and other.
 #
@@ -157,11 +155,3 @@ class QemuMigrateTestCase(unittest.TestCase):
 
         mock_ssh.SSH.from_node().execute.return_value = (1, '', 'FOOBAR')
         self.assertRaises(RuntimeError, q.run, result)
-
-
-def main():
-    unittest.main()
-
-
-if __name__ == '__main__':
-    main()
index 4f71fbb..dcc0e81 100644 (file)
@@ -1,5 +1,3 @@
-#!/usr/bin/env python
-
 ##############################################################################
 # Copyright (c) 2016 Huawei Technologies Co.,Ltd and others.
 #
@@ -235,10 +233,3 @@ class RamspeedTestCase(unittest.TestCase):
         mock_ssh.SSH.from_node().execute.return_value = (1, '', 'No such type_id: 30 for \
                                                Ramspeed scenario')
         self.assertRaises(RuntimeError, r.run, self.result)
-
-
-def main():
-    unittest.main()
-
-if __name__ == '__main__':
-    main()
index 74612d7..643e1ea 100644 (file)
@@ -1,5 +1,3 @@
-#!/usr/bin/env python
-
 ##############################################################################
 # Copyright (c) 2017 Huawei Technologies Co.,Ltd and others.
 #
@@ -75,11 +73,3 @@ class SpecCPUTestCase(unittest.TestCase):
 
         mock_ssh.SSH.from_node().execute.return_value = (1, '', 'FOOBAR')
         self.assertRaises(RuntimeError, s.run, self.result)
-
-
-def main():
-    unittest.main()
-
-
-if __name__ == '__main__':
-    main()
index c428e1f..74ef576 100644 (file)
@@ -1,5 +1,3 @@
-#!/usr/bin/env python
-
 ##############################################################################
 # Copyright (c) 2017 Huawei Technologies Co.,Ltd and others.
 #
@@ -76,9 +74,3 @@ class SpecCPUforVMTestCase(unittest.TestCase):
 
         mock_ssh.SSH.from_node().execute.return_value = (1, '', 'FOOBAR')
         self.assertRaises(RuntimeError, s.run, self.result)
-
-def main():
-    unittest.main()
-
-if __name__ == '__main__':
-    main()
index fec355b..6339a2d 100644 (file)
@@ -1,5 +1,3 @@
-#!/usr/bin/env python
-
 ##############################################################################
 # Copyright (c) 2015 Huawei Technologies Co.,Ltd and other.
 #
@@ -162,10 +160,3 @@ class UnixbenchTestCase(unittest.TestCase):
 
         mock_ssh.SSH.from_node().execute.return_value = (1, '', 'FOOBAR')
         self.assertRaises(RuntimeError, u.run, result)
-
-
-def main():
-    unittest.main()
-
-if __name__ == '__main__':
-    main()
index bc51318..875302d 100644 (file)
@@ -1,5 +1,3 @@
-#!/usr/bin/env python
-
 ##############################################################################
 # Copyright (c) 2015 Huawei Technologies Co.,Ltd and others.
 #
index bda07f7..98d967f 100644 (file)
@@ -55,11 +55,3 @@ class AddMemoryLoadTestCase(unittest.TestCase):
         obj = AddMemoryLoad(scenario_cfg, context_cfg)
         obj.run({})
         self.assertTrue(mock_from_node.called)
-
-
-def main():
-    unittest.main()
-
-
-if __name__ == '__main__':
-    main()
index 25b911d..a61195f 100644 (file)
@@ -24,11 +24,3 @@ class AttachVolumeTestCase(unittest.TestCase):
         obj = AttachVolume(args, {})
         obj.run({})
         self.assertTrue(mock_attach_server_volume.called)
-
-
-def main():
-    unittest.main()
-
-
-if __name__ == '__main__':
-    main()
index 7188c29..a48353a 100644 (file)
@@ -76,11 +76,3 @@ class CheckConnectivityTestCase(unittest.TestCase):
         obj.setup()
 
         mock_ssh.SSH.execute.return_value = (0, '100', '')
-
-
-def main():
-    unittest.main()
-
-
-if __name__ == '__main__':
-    main()
index f983f9c..a50e752 100644 (file)
@@ -74,11 +74,3 @@ class CheckNumaInfoTestCase(unittest.TestCase):
         obj = CheckNumaInfo(scenario_cfg, {})
         status = obj._check_vm2_status(info1, info2)
         self.assertFalse(status)
-
-
-def main():
-    unittest.main()
-
-
-if __name__ == '__main__':
-    main()
index 5a40e7d..7a2324b 100644 (file)
@@ -33,10 +33,3 @@ class CheckValueTestCase(unittest.TestCase):
         obj = CheckValue(scenario_cfg, {})
         self.assertRaises(AssertionError, obj.run, self.result)
         self.assertEqual({}, self.result)
-
-def main():
-    unittest.main()
-
-
-if __name__ == '__main__':
-    main()
index 036ae95..663ca5d 100644 (file)
@@ -27,11 +27,3 @@ class CreateFlavorTestCase(unittest.TestCase):
         obj = CreateFlavor(args, {})
         obj.run({})
         self.assertTrue(mock_create_flavor.called)
-
-
-def main():
-    unittest.main()
-
-
-if __name__ == '__main__':
-    main()
index b269579..639cf29 100644 (file)
@@ -33,11 +33,3 @@ class CreateImageTestCase(unittest.TestCase):
         obj.run({})
         mock_create_image.assert_called_once()
         mock_get_glance_client.assert_called_once()
-
-
-def main():
-    unittest.main()
-
-
-if __name__ == '__main__':
-    main()
index 10e351b..1c3d6ce 100644 (file)
@@ -25,11 +25,3 @@ class CreateKeypairTestCase(unittest.TestCase):
         obj = create_keypair.CreateKeypair(args, {})
         obj.run({})
         mock_op_utils.create_keypair.assert_called_once()
-
-
-def main():
-    unittest.main()
-
-
-if __name__ == '__main__':
-    main()
index e038285..ad4adee 100644 (file)
@@ -28,11 +28,3 @@ class CreateNetworkTestCase(unittest.TestCase):
         obj.run({})
         self.assertTrue(mock_get_neutron_client.called)
         self.assertTrue(mock_create_neutron_net.called)
-
-
-def main():
-    unittest.main()
-
-
-if __name__ == '__main__':
-    main()
index 0f15058..9a1611c 100644 (file)
@@ -25,11 +25,3 @@ class CreatePortTestCase(unittest.TestCase):
         obj = CreatePort(args, {})
         obj.run({})
         self.assertTrue(mock_get_neutron_client.called)
-
-
-def main():
-    unittest.main()
-
-
-if __name__ == '__main__':
-    main()
index 8f3914b..1079214 100644 (file)
@@ -28,11 +28,3 @@ class CreateRouterTestCase(unittest.TestCase):
         obj.run({})
         self.assertTrue(mock_get_neutron_client.called)
         self.assertTrue(mock_create_neutron_router.called)
-
-
-def main():
-    unittest.main()
-
-
-if __name__ == '__main__':
-    main()
index c1c137c..b557673 100644 (file)
@@ -28,11 +28,3 @@ class CreateSecGroupTestCase(unittest.TestCase):
         obj.run({})
         self.assertTrue(mock_get_neutron_client.called)
         self.assertTrue(mock_create_security_group_full.called)
-
-
-def main():
-    unittest.main()
-
-
-if __name__ == '__main__':
-    main()
index 74003b9..faee98f 100644 (file)
@@ -32,11 +32,3 @@ class CreateServerTestCase(unittest.TestCase):
         self.assertTrue(mock_get_glance_client.called)
         self.assertTrue(mock_get_neutron_client.called)
         self.assertTrue(mock_create_instance_and_wait_for_active.called)
-
-
-def main():
-    unittest.main()
-
-
-if __name__ == '__main__':
-    main()
index b7f29df..1536e83 100644 (file)
@@ -30,11 +30,3 @@ class CreateSubnetTestCase(unittest.TestCase):
         obj.run({})
         self.assertTrue(mock_get_neutron_client.called)
         self.assertTrue(mock_create_neutron_subnet.called)
-
-
-def main():
-    unittest.main()
-
-
-if __name__ == '__main__':
-    main()
index ca055db..4bfec32 100644 (file)
@@ -98,11 +98,3 @@ class CreateVolumeTestCase(unittest.TestCase):
         self.assertTrue(mock_image_id.called)
         self.assertTrue(mock_get_glance_client.called)
         self.assertTrue(mock_get_cinder_client.called)
-
-
-def main():
-    unittest.main()
-
-
-if __name__ == '__main__':
-    main()
index 4a91b89..e345afe 100644 (file)
@@ -25,11 +25,3 @@ class DeleteFlavorTestCase(unittest.TestCase):
         obj.run({})
         self.assertTrue(mock_get_nova_client.called)
         self.assertTrue(mock_delete_flavor.called)
-
-
-def main():
-    unittest.main()
-
-
-if __name__ == '__main__':
-    main()
index df23212..be99719 100644 (file)
@@ -25,11 +25,3 @@ class DeleteFloatingIpTestCase(unittest.TestCase):
         obj.run({})
         self.assertTrue(mock_get_nova_client.called)
         self.assertTrue(mock_delete_floating_ip.called)
-
-
-def main():
-    unittest.main()
-
-
-if __name__ == '__main__':
-    main()
index 9edc2ff..eb3f9fc 100644 (file)
@@ -27,11 +27,3 @@ class DeleteImageTestCase(unittest.TestCase):
         self.assertTrue(mock_delete_image.called)
         self.assertTrue(mock_image_id.called)
         self.assertTrue(mock_get_glance_client.called)
-
-
-def main():
-    unittest.main()
-
-
-if __name__ == '__main__':
-    main()
index 73894a9..38cc929 100644 (file)
@@ -25,11 +25,3 @@ class DeleteKeypairTestCase(unittest.TestCase):
         obj.run({})
         self.assertTrue(mock_get_nova_client.called)
         self.assertTrue(mock_delete_keypair.called)
-
-
-def main():
-    unittest.main()
-
-
-if __name__ == '__main__':
-    main()
index de3179b..008ed91 100644 (file)
@@ -23,11 +23,3 @@ class DeletePortTestCase(unittest.TestCase):
         obj = DeletePort(args, {})
         obj.run({})
         self.assertTrue(mock_get_neutron_client.called)
-
-
-def main():
-    unittest.main()
-
-
-if __name__ == '__main__':
-    main()
index 73cb812..9b31566 100644 (file)
@@ -25,11 +25,3 @@ class DeleteRouterTestCase(unittest.TestCase):
         obj.run({})
         self.assertTrue(mock_get_neutron_client.called)
         self.assertTrue(mock_delete_neutron_router.called)
-
-
-def main():
-    unittest.main()
-
-
-if __name__ == '__main__':
-    main()
index 3cfc4ed..e19c38d 100644 (file)
@@ -25,11 +25,3 @@ class DeleteRouterGatewayTestCase(unittest.TestCase):
         obj.run({})
         self.assertTrue(mock_get_neutron_client.called)
         self.assertTrue(mock_remove_gateway_router.called)
-
-
-def main():
-    unittest.main()
-
-
-if __name__ == '__main__':
-    main()
index 67aff10..6c4fdd5 100644 (file)
@@ -26,11 +26,3 @@ class DeleteRouterInterfaceTestCase(unittest.TestCase):
         obj.run({})
         self.assertTrue(mock_get_neutron_client.called)
         self.assertTrue(mock_remove_interface_router.called)
-
-
-def main():
-    unittest.main()
-
-
-if __name__ == '__main__':
-    main()
index 622ead5..dedce2d 100644 (file)
@@ -25,11 +25,3 @@ class DeleteServerTestCase(unittest.TestCase):
         obj.run({})
         self.assertTrue(mock_get_nova_client.called)
         self.assertTrue(mock_delete_instance.called)
-
-
-def main():
-    unittest.main()
-
-
-if __name__ == '__main__':
-    main()
index 9438b07..2ea82e2 100644 (file)
@@ -25,11 +25,3 @@ class DeleteVolumeTestCase(unittest.TestCase):
         obj.run({})
         self.assertTrue(mock_get_cinder_client.called)
         self.assertTrue(mock_delete_volume.called)
-
-
-def main():
-    unittest.main()
-
-
-if __name__ == '__main__':
-    main()
index 87af63a..34fbac6 100644 (file)
@@ -24,11 +24,3 @@ class DetachVolumeTestCase(unittest.TestCase):
         obj = DetachVolume(args, {})
         obj.run({})
         self.assertTrue(mock_detach_volume.called)
-
-
-def main():
-    unittest.main()
-
-
-if __name__ == '__main__':
-    main()
index bf12e0a..e9025f3 100644 (file)
@@ -23,11 +23,3 @@ class GetFlavorTestCase(unittest.TestCase):
         obj = GetFlavor(args, {})
         obj.run({})
         self.assertTrue(mock_get_flavor_by_name.called)
-
-
-def main():
-    unittest.main()
-
-
-if __name__ == '__main__':
-    main()
index f046c92..aa9f63e 100644 (file)
@@ -41,11 +41,3 @@ class GetMigrateTargetHostTestCase(unittest.TestCase):
         host = obj._get_migrate_host('host5')
         self.assertTrue(mock_get_nova_client.called)
         self.assertEqual(host, 'host4')
-
-
-def main():
-    unittest.main()
-
-
-if __name__ == '__main__':
-    main()
index 50d5238..4b2132c 100644 (file)
@@ -101,11 +101,3 @@ class GetNumaInfoTestCase(unittest.TestCase):
         obj = GetNumaInfo(scenario_cfg, {})
         result = obj._get_current_host_name('1')
         self.assertEqual(result, 'host5')
-
-
-def main():
-    unittest.main()
-
-
-if __name__ == '__main__':
-    main()
index aebbf54..97b81ed 100644 (file)
@@ -40,11 +40,3 @@ class GetServerTestCase(unittest.TestCase):
         obj = GetServer(scenario_cfg, {})
         obj.run({})
         self.assertTrue(mock_get_nova_client.called)
-
-
-def main():
-    unittest.main()
-
-
-if __name__ == '__main__':
-    main()
index 3d20d54..04fca16 100644 (file)
@@ -31,11 +31,3 @@ class GetServerIpTestCase(unittest.TestCase):
         obj = GetServerIp(scenario_cfg, {})
         result = obj.run({})
         self.assertEqual(result, {'ip': '127.0.0.1'})
-
-
-def main():
-    unittest.main()
-
-
-if __name__ == '__main__':
-    main()
index 4d37452..d663638 100644 (file)
@@ -1,5 +1,3 @@
-#!/usr/bin/env python
-
 ##############################################################################
 # Copyright (c) 2015 Ericsson AB and others.
 #
@@ -193,10 +191,3 @@ class IperfTestCase(unittest.TestCase):
         with open(output) as f:
             sample_output = f.read()
         return sample_output
-
-
-def main():
-    unittest.main()
-
-if __name__ == '__main__':
-    main()
index d82a009..5907562 100755 (executable)
@@ -1,5 +1,3 @@
-#!/usr/bin/env python
-
 ##############################################################################
 # Copyright (c) 2015 Huawei Technologies Co.,Ltd and others.
 #
@@ -121,10 +119,3 @@ class NetperfTestCase(unittest.TestCase):
         with open(output) as f:
             sample_output = f.read()
         return sample_output
-
-
-def main():
-    unittest.main()
-
-if __name__ == '__main__':
-    main()
index 8be9bb9..956a9c0 100755 (executable)
@@ -1,5 +1,3 @@
-#!/usr/bin/env python
-
 ##############################################################################
 # Copyright (c) 2015 Huawei Technologies Co.,Ltd and others.
 #
@@ -121,10 +119,3 @@ class NetperfNodeTestCase(unittest.TestCase):
         with open(output) as f:
             sample_output = f.read()
         return sample_output
-
-
-def main():
-    unittest.main()
-
-if __name__ == '__main__':
-    main()
index 1227e05..4cdfde6 100644 (file)
@@ -1,5 +1,3 @@
-#!/usr/bin/env python
-
 ##############################################################################
 # Copyright (c) 2016 Huawei Technologies Co.,Ltd and other.
 #
index 3e7a3c5..36e8c8a 100644 (file)
@@ -1,5 +1,3 @@
-#!/usr/bin/env python
-
 ##############################################################################
 # Copyright (c) 2016 Huawei Technologies Co.,Ltd and others.
 #
index 7dd5351..b02d584 100644 (file)
@@ -103,11 +103,3 @@ class NstatTestCase(unittest.TestCase):
 
         mock_ssh.SSH.from_node().execute.return_value = (1, '', 'FOOBAR')
         self.assertRaises(RuntimeError, n.run, result)
-
-
-def main():
-    unittest.main()
-
-
-if __name__ == '__main__':
-    main()
index 0635324..4adfab1 100644 (file)
@@ -1,5 +1,3 @@
-#!/usr/bin/env python
-
 ##############################################################################
 # Copyright (c) 2015 Ericsson AB and others.
 #
@@ -92,10 +90,3 @@ class PingTestCase(unittest.TestCase):
 
         mock_ssh.SSH.from_node().execute.return_value = (1, '', 'FOOBAR')
         self.assertRaises(RuntimeError, p.run, result)
-
-
-def main():
-    unittest.main()
-
-if __name__ == '__main__':
-    main()
index d2be6f5..4662c85 100644 (file)
@@ -1,5 +1,3 @@
-#!/usr/bin/env python
-
 ##############################################################################
 # Copyright (c) 2015 Ericsson AB and others.
 #
@@ -116,10 +114,3 @@ class PingTestCase(unittest.TestCase):
         mock_ssh.SSH.from_node().execute.side_effect = [
             (0, 'host1', ''), (1, '', 'FOOBAR')]
         self.assertRaises(RuntimeError, p.run, result)
-
-
-def main():
-    unittest.main()
-
-if __name__ == '__main__':
-    main()
index acd9027..6aea03a 100644 (file)
@@ -665,11 +665,3 @@ class PktgenTestCase(unittest.TestCase):
         expected_result["packets_received"] = 149300
         expected_result["packetsize"] = 60
         self.assertEqual(result, expected_result)
-
-
-def main():
-    unittest.main()
-
-
-if __name__ == '__main__':
-    main()
index 99399ab..9760871 100644 (file)
@@ -176,11 +176,3 @@ class PktgenDPDKLatencyTestCase(unittest.TestCase):
 
         self.mock_ssh.SSH.from_node().execute.return_value = (1, '', 'FOOBAR')
         self.assertRaises(RuntimeError, p.run, result)
-
-
-def main():
-    unittest.main()
-
-
-if __name__ == '__main__':
-    main()
index 1b12bd5..e90fb07 100644 (file)
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
 ##############################################################################
 # Copyright (c) 2017 Nokia and others.
 #
@@ -192,11 +191,3 @@ class PktgenDPDKTestCase(unittest.TestCase):
 
         mock_ssh.SSH().execute.assert_called_with(
             "sudo /dpdk/destdir/bin/dpdk-procinfo -- --stats-reset > /dev/null 2>&1")
-
-
-def main():
-    unittest.main()
-
-
-if __name__ == '__main__':
-    main()
index 78c0352..a5e5e39 100644 (file)
@@ -1,5 +1,3 @@
-#!/usr/bin/env python
-
 ##############################################################################
 # Copyright (c) 2015 Ericsson AB and others.
 #
@@ -68,10 +66,3 @@ class SfcTestCase(unittest.TestCase):
         self.sfc.setup()
         self.sfc.run(result)
         self.sfc.teardown()
-
-
-def main():
-    unittest.main()
-
-if __name__ == '__main__':
-    main()
index be8ac55..419605b 100644 (file)
@@ -1,5 +1,3 @@
-#!/usr/bin/env python
-
 # Copyright 2016 Intel Corporation.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
@@ -126,11 +124,3 @@ class VsperfTestCase(unittest.TestCase):
 
         result = {}
         self.assertRaises(RuntimeError, p.run, result)
-
-
-def main():
-    unittest.main()
-
-
-if __name__ == '__main__':
-    main()
index 1923960..1d2278e 100644 (file)
@@ -211,11 +211,3 @@ class VsperfDPDKTestCase(unittest.TestCase):
 
         result = {}
         self.assertRaises(RuntimeError, self.scenario.run, result)
-
-
-def main():
-    unittest.main()
-
-
-if __name__ == '__main__':
-    main()
index ee2bbc0..9fd5cce 100644 (file)
@@ -1,5 +1,3 @@
-#!/usr/bin/env python
-
 ##############################################################################
 # Copyright (c) 2015 Huawei Technologies Co.,Ltd and other.
 #
@@ -70,10 +68,3 @@ class ParserTestCase(unittest.TestCase):
         self.mock_call.return_value = 0
         self.scenario.teardown()
         self.assertTrue(self.scenario.teardown_done)
-
-
-def main():
-    unittest.main()
-
-if __name__ == '__main__':
-    main()
index b98dcea..d785065 100644 (file)
@@ -1,5 +1,3 @@
-#!/usr/bin/env python
-
 ##############################################################################
 # Copyright (c) 2017 Huawei Technologies Co.,Ltd and others.
 #
@@ -9,8 +7,6 @@
 # http://www.apache.org/licenses/LICENSE-2.0
 ##############################################################################
 
-# Unittest for yardstick.benchmark.scenarios.storage.bonnie.Bonnie
-
 from __future__ import absolute_import
 
 import unittest
@@ -65,11 +61,3 @@ class BonnieTestCase(unittest.TestCase):
 
         mock_ssh.SSH.from_node().execute.return_value = (1, '', 'FOOBAR')
         self.assertRaises(RuntimeError, b.run, self.result)
-
-
-def main():
-    unittest.main()
-
-
-if __name__ == '__main__':
-    main()
index 0cffea2..f47d1ca 100644 (file)
@@ -1,5 +1,3 @@
-#!/usr/bin/env python
-
 ##############################################################################
 # Copyright (c) 2015 Ericsson AB and others.
 #
@@ -263,11 +261,3 @@ class FioTestCase(unittest.TestCase):
         with open(output) as f:
             sample_output = f.read()
         return sample_output
-
-
-def main():
-    unittest.main()
-
-
-if __name__ == '__main__':
-    main()
index 095674f..c1c731b 100644 (file)
@@ -1,5 +1,3 @@
-#!/usr/bin/env python
-
 ##############################################################################
 # Copyright (c) 2016 Huawei Technologies Co.,Ltd and others.
 #
@@ -99,10 +97,3 @@ class StorageCapacityTestCase(unittest.TestCase):
 
         mock_ssh.SSH.from_node().execute.return_value = (1, '', 'FOOBAR')
         self.assertRaises(RuntimeError, c.run, self.result)
-
-
-def main():
-    unittest.main()
-
-if __name__ == '__main__':
-    main()
index 52786d7..5844746 100644 (file)
@@ -1,5 +1,3 @@
-#!/usr/bin/env python
-
 ##############################################################################
 # Copyright (c) 2016 Huawei Technologies Co.,Ltd.
 #
@@ -233,10 +231,3 @@ class StorPerfTestCase(unittest.TestCase):
         s = storperf.StorPerf(args, self.ctx)
 
         self.assertRaises(AssertionError, s.teardown(), self.result)
-
-
-def main():
-    unittest.main()
-
-if __name__ == '__main__':
-    main()
index eb09d1a..12a8be3 100644 (file)
@@ -33,11 +33,3 @@ class HttpClientTestCase(unittest.TestCase):
         url = 'http://localhost:5000/hello'
         httpClient.HttpClient().get(url)
         mock_requests.get.assert_called_with(url)
-
-
-def main():
-    unittest.main()
-
-
-if __name__ == '__main__':
-    main()
index 44aa803..56253ef 100644 (file)
@@ -45,10 +45,3 @@ class TemplateFormatTestCase(unittest.TestCase):
                 "Resources: {}\n" \
                 "Outputs: {}"
         self.assertRaises(ValueError, template_format.parse, yaml2)
-
-
-def main():
-    unittest.main()
-
-if __name__ == '__main__':
-    main()
index 6c2beb4..e621dcb 100644 (file)
@@ -12,7 +12,6 @@
 
 # yardstick: this file is copied from python-heatclient and slightly modified
 
-from __future__ import absolute_import
 import unittest
 
 from yardstick.common import yaml_loader
@@ -23,10 +22,3 @@ class TemplateFormatTestCase(unittest.TestCase):
     def test_parse_to_value_exception(self):
 
         self.assertEqual(yaml_loader.yaml_load("string"), u"string")
-
-
-def main():
-    unittest.main()
-
-if __name__ == '__main__':
-    main()
index bca94e3..c844d4b 100644 (file)
@@ -1,5 +1,3 @@
-#!/usr/bin/env python
-
 ##############################################################################
 # Copyright (c) 2015 Huawei Technologies Co.,Ltd and others.
 #
@@ -104,11 +102,3 @@ class InfluxdbDispatcherTestCase(unittest.TestCase):
         mock_time.time.return_value = 1451461248.925574
         self.assertEqual(influxdb._get_nano_timestamp(results),
                          '1451461248925574144')
-
-
-def main():
-    unittest.main()
-
-
-if __name__ == '__main__':
-    main()
index 33fa1dc..f2bc5b0 100644 (file)
@@ -1,5 +1,3 @@
-#!/usr/bin/env python
-
 ##############################################################################
 # Copyright (c) 2017 Intel Corporation
 #
@@ -104,11 +102,3 @@ service ssh restart;while true ; do sleep 10000; done']
         mock_get_pod_list.return_value.items = []
         pods = k8s_template.get_rc_pods()
         self.assertEqual(pods, [])
-
-
-def main():
-    unittest.main()
-
-
-if __name__ == '__main__':
-    main()
index 13c3ed4..1156b66 100644 (file)
@@ -63,11 +63,3 @@ class EnvCommandTestCase(unittest.TestCase):
         except Exception as e:  # pylint: disable=broad-except
             # NOTE(ralonsoh): try to reduce the scope of this exception.
             self.assertIsInstance(e, IndexError)
-
-
-def main():
-    unittest.main()
-
-
-if __name__ == '__main__':
-    main()
index 7ef157c..f6f842e 100644 (file)
@@ -19,11 +19,3 @@ class TestcaseCommandsUT(unittest.TestCase):
         mock_client.get.return_value = {'result': []}
         TestcaseCommands().do_list({})
         self.assertTrue(mock_print.called)
-
-
-def main():
-    unittest.main()
-
-
-if __name__ == '__main__':
-    main()
index 1366c3c..d64b0c5 100644 (file)
@@ -1,5 +1,3 @@
-#!/usr/bin/env python
-
 # Copyright (c) 2016-2017 Intel Corporation
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
index 615783f..f922900 100644 (file)
@@ -602,11 +602,3 @@ class TestAutoConnectSSH(unittest.TestCase):
 
         auto_connect_ssh.put_file('a', 'b')
         self.assertEqual(mock_put_sftp.call_count, 1)
-
-
-def main():
-    unittest.main()
-
-
-if __name__ == '__main__':
-    main()