summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornicolargo <nicolas@nicolargo.com>2021-04-20 18:52:02 +0200
committernicolargo <nicolas@nicolargo.com>2021-04-20 18:52:02 +0200
commit15ba40f456c8a578d37f9d723868b0bc1ff7da94 (patch)
treef6d07c02e6ae1b6a8f1bde6d14e1e0a509a73e46
parenta78da548f40564bb849f52d299474371cdda6c53 (diff)
Correct Flake8 issue on unitest file
-rwxr-xr-xunitest.py18
1 files changed, 9 insertions, 9 deletions
diff --git a/unitest.py b/unitest.py
index 902f3eb7..ea91ea9e 100755
--- a/unitest.py
+++ b/unitest.py
@@ -245,14 +245,14 @@ class TestGlances(unittest.TestCase):
def test_015_subsample(self):
"""Test subsampling function."""
print('INFO: [TEST_015] Subsampling')
- for l in [([1, 2, 3], 4),
- ([1, 2, 3, 4], 4),
- ([1, 2, 3, 4, 5, 6, 7], 4),
- ([1, 2, 3, 4, 5, 6, 7, 8], 4),
- (list(range(1, 800)), 4),
- (list(range(1, 8000)), 800)]:
- l_subsample = subsample(l[0], l[1])
- self.assertLessEqual(len(l_subsample), l[1])
+ for l_test in [([1, 2, 3], 4),
+ ([1, 2, 3, 4], 4),
+ ([1, 2, 3, 4, 5, 6, 7], 4),
+ ([1, 2, 3, 4, 5, 6, 7, 8], 4),
+ (list(range(1, 800)), 4),
+ (list(range(1, 8000)), 800)]:
+ l_subsample = subsample(l_test[0], l_test[1])
+ self.assertLessEqual(len(l_subsample), l_test[1])
def test_016_hddsmart(self):
"""Check hard disk SMART data plugin."""
@@ -309,7 +309,7 @@ class TestGlances(unittest.TestCase):
print('INFO: [TEST_096] Test views')
plugins_list = stats.getPluginsList()
for plugin in plugins_list:
- stats_grab = stats.get_plugin(plugin).get_raw()
+ stats.get_plugin(plugin).get_raw()
views_grab = stats.get_plugin(plugin).get_views()
self.assertTrue(type(views_grab) is dict,
msg='{} view is not a dict'.format(plugin))