mirror of
https://github.com/nicolargo/glances.git
synced 2024-11-28 05:42:57 +03:00
Correct unitary test following PR #1873
This commit is contained in:
parent
0e9e5e9512
commit
1f90393a03
12
unitest.py
12
unitest.py
@ -343,12 +343,12 @@ class TestGlances(unittest.TestCase):
|
|||||||
# GlancesHistory
|
# GlancesHistory
|
||||||
from glances.history import GlancesHistory
|
from glances.history import GlancesHistory
|
||||||
h = GlancesHistory()
|
h = GlancesHistory()
|
||||||
h.add('a', 1)
|
h.add('a', 1, history_max_size=100)
|
||||||
h.add('a', 2)
|
h.add('a', 2, history_max_size=100)
|
||||||
h.add('a', 3)
|
h.add('a', 3, history_max_size=100)
|
||||||
h.add('b', 10)
|
h.add('b', 10, history_max_size=100)
|
||||||
h.add('b', 20)
|
h.add('b', 20, history_max_size=100)
|
||||||
h.add('b', 30)
|
h.add('b', 30, history_max_size=100)
|
||||||
self.assertEqual(len(h.get()), 2)
|
self.assertEqual(len(h.get()), 2)
|
||||||
self.assertEqual(len(h.get()['a']), 3)
|
self.assertEqual(len(h.get()['a']), 3)
|
||||||
h.reset()
|
h.reset()
|
||||||
|
Loading…
Reference in New Issue
Block a user