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_compare_test.py | |
parent | Adding upstream version 2.0. (diff) | |
download | nvme-cli-a751023422eadf87cd8d6484878193a4914a9d85.tar.xz nvme-cli-a751023422eadf87cd8d6484878193a4914a9d85.zip |
Adding upstream version 2.1~rc0.upstream/2.1_rc0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/nvme_compare_test.py')
-rw-r--r-- | tests/nvme_compare_test.py | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/tests/nvme_compare_test.py b/tests/nvme_compare_test.py index c919c07..8dfce04 100644 --- a/tests/nvme_compare_test.py +++ b/tests/nvme_compare_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 Compare Command Testcase:- """ -from nose.tools import assert_equal, assert_not_equal from nvme_test_io import TestNVMeIO @@ -44,9 +45,9 @@ class TestNVMeCompareCmd(TestNVMeIO): - test_log_dir : directory for logs, temp files. """ - def __init__(self): + def setUp(self): """ Pre Section for TestNVMeCompareCmd """ - TestNVMeIO.__init__(self) + super().setUp() self.data_size = 1024 self.start_block = 1023 self.setup_log_dir(self.__class__.__name__) @@ -55,9 +56,9 @@ class TestNVMeCompareCmd(TestNVMeIO): self.create_data_file(self.write_file, self.data_size, "15") self.create_data_file(self.compare_file, self.data_size, "25") - def __del__(self): + def tearDown(self): """ Post Section for TestNVMeCompareCmd """ - TestNVMeIO.__del__(self) + super().tearDown() def nvme_compare(self, cmp_file): """ Wrapper for nvme compare command. @@ -74,6 +75,6 @@ class TestNVMeCompareCmd(TestNVMeIO): def test_nvme_compare(self): """ Testcase main """ - assert_equal(self.nvme_write(), 0) - assert_not_equal(self.nvme_compare(self.compare_file), 0) - assert_equal(self.nvme_compare(self.write_file), 0) + self.assertEqual(self.nvme_write(), 0) + self.assertNotEqual(self.nvme_compare(self.compare_file), 0) + self.assertEqual(self.nvme_compare(self.write_file), 0) |