Skip to content

Commit

Permalink
tests: Do not ignore entire test files in pylint
Browse files Browse the repository at this point in the history
  • Loading branch information
vojtechtrefny committed Feb 1, 2024
1 parent dd0bc77 commit 4905536
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
3 changes: 1 addition & 2 deletions tests/unit_tests/devicelibs_test/disk_test.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# pylint: skip-file
import unittest
from unittest.mock import Mock, patch, sentinel

Expand Down Expand Up @@ -106,7 +105,7 @@ def system_by_id(sys_id):
"volume_raid_info.side_effect": client_volume_raid_info})
_lsm.Client = client_mock
disklib.update_volume_info()
for (i, lvol) in enumerate(_client_volumes):
for (_i, lvol) in enumerate(_client_volumes):
bvol = disklib.volumes[lvol.nodes[0]]
system = system_by_id(lvol.system_id)
self.assertEqual(bvol.system, system.name)
Expand Down
1 change: 0 additions & 1 deletion tests/unit_tests/devices_test/disk_test.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# pylint: skip-file
import unittest
from unittest.mock import patch

Expand Down
5 changes: 2 additions & 3 deletions tests/unit_tests/util_test.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# pylint: skip-file
import os
import tempfile
import unittest
Expand Down Expand Up @@ -123,7 +122,7 @@ def test_requires_property(self):
self.assertEqual(t.good_news, "Everything okay!")

with self.assertRaises(ValueError):
t.bad_news
t.bad_news # pylint: disable=pointless-statement


class TestDependencyGuard(util.DependencyGuard):
Expand All @@ -146,7 +145,7 @@ def _test_dependency_guard_non_critical(self):
return True

def test_dependency_guard(self):
guard = TestDependencyGuard()
_guard = TestDependencyGuard()
with self.assertLogs("blivet", level="WARNING") as cm:
self.assertEqual(self._test_dependency_guard_non_critical(), None)
self.assertTrue(TestDependencyGuard.error_msg in "\n".join(cm.output))
Expand Down

0 comments on commit 4905536

Please sign in to comment.