diff options
author | nicolargo <nicolas@nicolargo.com> | 2021-04-20 18:52:02 +0200 |
---|---|---|
committer | nicolargo <nicolas@nicolargo.com> | 2021-04-20 18:52:02 +0200 |
commit | 15ba40f456c8a578d37f9d723868b0bc1ff7da94 (patch) | |
tree | f6d07c02e6ae1b6a8f1bde6d14e1e0a509a73e46 /unitest.py | |
parent | a78da548f40564bb849f52d299474371cdda6c53 (diff) |
Correct Flake8 issue on unitest file
Diffstat (limited to 'unitest.py')
-rwxr-xr-x | unitest.py | 18 |
1 files changed, 9 insertions, 9 deletions
@@ -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)) |