From 8f369d3fbc216c20645d4b8e16d2f23304c2b76e Mon Sep 17 00:00:00 2001 From: Amos Kong Date: Wed, 19 Feb 2020 14:32:50 +0000 Subject: [PATCH] fix(pylint): fix pylint error of duplicate code Signed-off-by: Amos Kong --- unit_tests/test_prometheus.py | 11 ----------- unit_tests/test_send_email.py | 5 ++--- 2 files changed, 2 insertions(+), 14 deletions(-) diff --git a/unit_tests/test_prometheus.py b/unit_tests/test_prometheus.py index 18b6b38edc..3721e97ea8 100644 --- a/unit_tests/test_prometheus.py +++ b/unit_tests/test_prometheus.py @@ -1,7 +1,6 @@ import os import time import unittest -import tempfile import shutil import json import requests @@ -126,16 +125,6 @@ def stop(self, timeout=None): class PrometheusAlertManagerTest(unittest.TestCase): - temp_dir = None - - @classmethod - def setUpClass(cls): - cls.temp_dir = tempfile.mkdtemp() - - @classmethod - def tearDownClass(cls): - # stop_events_device() - shutil.rmtree(cls.temp_dir) def test_alert_manager_listener_artificial_run(self): with open(os.path.join(os.path.dirname(__file__), diff --git a/unit_tests/test_send_email.py b/unit_tests/test_send_email.py index 1412287d3e..803e458a11 100644 --- a/unit_tests/test_send_email.py +++ b/unit_tests/test_send_email.py @@ -16,12 +16,11 @@ class EmailReporterTest(unittest.TestCase): temp_dir = None @classmethod - def setUpClass(cls): + def setUpClass(cls): # pylint: disable=invalid-name cls.temp_dir = tempfile.mkdtemp() @classmethod - def tearDownClass(cls): - # stop_events_device() + def tearDownClass(cls): # pylint: disable=invalid-name shutil.rmtree(cls.temp_dir) def _get_report_data(self, zipfile_path):