diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2022-07-26 05:11:33 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2022-07-26 05:11:33 +0000 |
commit | a751023422eadf87cd8d6484878193a4914a9d85 (patch) | |
tree | 3fca0ae6325173fc2583e7d88abe4c38e6193277 /tests/nvme_writeuncor_test.py | |
parent | Adding upstream version 2.0. (diff) | |
download | nvme-cli-upstream/2.1_rc0.tar.xz nvme-cli-upstream/2.1_rc0.zip |
Adding upstream version 2.1~rc0.upstream/2.1_rc0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | tests/nvme_writeuncor_test.py | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/tests/nvme_writeuncor_test.py b/tests/nvme_writeuncor_test.py index 9f96f63..1083d46 100644 --- a/tests/nvme_writeuncor_test.py +++ b/tests/nvme_writeuncor_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 @@ -28,7 +30,6 @@ NVMe Write Compare Testcae:- """ -from nose.tools import assert_equal, assert_not_equal from nvme_test_io import TestNVMeIO @@ -41,9 +42,9 @@ class TestNVMeUncor(TestNVMeIO): - test_log_dir : directory for logs, temp files. """ - def __init__(self): + def setUp(self): """ Constructor TestNVMeUncor """ - TestNVMeIO.__init__(self) + super().setUp() self.start_block = 1023 self.setup_log_dir(self.__class__.__name__) self.write_file = self.test_log_dir + "/" + self.write_file @@ -51,9 +52,9 @@ class TestNVMeUncor(TestNVMeIO): self.create_data_file(self.write_file, self.data_size, "15") open(self.read_file, 'a').close() - def __del__(self): + def tearDown(self): """ Post Section for TestNVMeUncor """ - TestNVMeIO.__del__(self) + super().tearDown() def write_uncor(self): """ Wrapper for nvme write uncorrectable @@ -69,8 +70,8 @@ class TestNVMeUncor(TestNVMeIO): def test_write_uncor(self): """ Testcase main """ - assert_equal(self.nvme_read(), 0) - assert_equal(self.write_uncor(), 0) - assert_not_equal(self.nvme_read(), 0) - assert_equal(self.nvme_write(), 0) - assert_equal(self.nvme_read(), 0) + self.assertEqual(self.nvme_read(), 0) + self.assertEqual(self.write_uncor(), 0) + self.assertNotEqual(self.nvme_read(), 0) + self.assertEqual(self.nvme_write(), 0) + self.assertEqual(self.nvme_read(), 0) |