diff options
author | nicolargo <nicolas@nicolargo.com> | 2018-04-02 14:18:19 +0200 |
---|---|---|
committer | nicolargo <nicolas@nicolargo.com> | 2018-04-02 14:18:19 +0200 |
commit | 982054becd85e443b0f6e69e1157f9299fabcd83 (patch) | |
tree | c6c449e8ec092617a73008dd789b3c74a47ca410 /unitest.py | |
parent | 376ce7a8e9e447848b050029e402d10dbbd5bf01 (diff) |
Correct an subsampling issue on Python 3
Diffstat (limited to 'unitest.py')
-rwxr-xr-x | unitest.py | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -34,7 +34,7 @@ from glances.thresholds import GlancesThresholdWarning from glances.thresholds import GlancesThresholdCritical from glances.thresholds import GlancesThresholds from glances.plugins.glances_plugin import GlancesPlugin -from glances.compat import subsample +from glances.compat import subsample, range # Global variables # ================= @@ -249,8 +249,8 @@ class TestGlances(unittest.TestCase): ([1, 2, 3, 4], 4), ([1, 2, 3, 4, 5, 6, 7], 4), ([1, 2, 3, 4, 5, 6, 7, 8], 4), - (list(xrange(1, 800)), 4), - (list(xrange(1, 8000)), 800)]: + (list(range(1, 800)), 4), + (list(range(1, 8000)), 800)]: l_subsample = subsample(l[0], l[1]) self.assertLessEqual(len(l_subsample), l[1]) |