Skip to content

Commit

Permalink
Add test case for clearing of maps from python
Browse files Browse the repository at this point in the history
Fixes: iovisor#142
Signed-off-by: Brenden Blanco <[email protected]>
  • Loading branch information
Brenden Blanco committed Aug 22, 2015
1 parent 29856f6 commit 4f74646
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/cc/test_stat1.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,12 @@ def test_ping(self):
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()

0 comments on commit 4f74646

Please sign in to comment.