summaryrefslogtreecommitdiffstats
path: root/tests/nvme_smart_log_test.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/nvme_smart_log_test.py')
-rw-r--r--tests/nvme_smart_log_test.py15
1 files changed, 8 insertions, 7 deletions
diff --git a/tests/nvme_smart_log_test.py b/tests/nvme_smart_log_test.py
index 356aa08..916ef49 100644
--- a/tests/nvme_smart_log_test.py
+++ b/tests/nvme_smart_log_test.py
@@ -1,3 +1,5 @@
+# SPDX-License-Identifier: GPL-2.0-or-later
+#
# Copyright (c) 2015-2016 Western Digital Corporation or its affiliates.
#
# This program is free software; you can redistribute it and/or
@@ -25,7 +27,6 @@ NVMe Smart Log Verification Testcase:-
"""
-from nose.tools import assert_equal
from nvme_test import TestNVMe
@@ -37,18 +38,18 @@ class TestNVMeSmartLogCmd(TestNVMe):
- Attributes:
"""
- def __init__(self):
+ def setUp(self):
""" Pre Section for TestNVMeSmartLogCmd """
- TestNVMe.__init__(self)
+ super().setUp()
self.setup_log_dir(self.__class__.__name__)
- def __del__(self):
+ def tearDown(self):
"""
Post Section for TestNVMeSmartLogCmd
- Call super class's destructor.
"""
- TestNVMe.__del__(self)
+ super().tearDown()
def get_smart_log_ctrl(self):
""" Wrapper for executing smart-log on controller.
@@ -82,7 +83,7 @@ class TestNVMeSmartLogCmd(TestNVMe):
def test_smart_log(self):
""" Testcase main """
- assert_equal(self.get_smart_log_ctrl(), 0)
+ self.assertEqual(self.get_smart_log_ctrl(), 0)
smlp = self.supp_check_id_ctrl("lpa")
if smlp & 0x1 == True:
- assert_equal(self.get_smart_log_all_ns(), 0)
+ self.assertEqual(self.get_smart_log_all_ns(), 0)