Commit 4f746462 authored by Brenden Blanco's avatar Brenden Blanco

Add test case for clearing of maps from python

Fixes: #142
Signed-off-by: default avatarBrenden Blanco <bblanco@plumgrid.com>
parent 29856f67
......@@ -49,6 +49,12 @@ class TestBPFSocket(TestCase):
x = self.stats[key]
with self.assertRaises(KeyError):
del self.stats[key]
self.stats.clear()
self.assertEqual(len(self.stats), 0)
self.stats[key] = leaf
self.assertEqual(len(self.stats), 1)
self.stats.clear()
self.assertEqual(len(self.stats), 0)
if __name__ == "__main__":
main()
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment