Esempio n. 1
0
    def test_clear_nonempty(self):
        """Clear a nonempty bimap."""
        bimap = BiMap({1: "first", 2: "second"})
        bimap.clear()

        self.assertEqual(0, len(bimap))
Esempio n. 2
0
    def test_clear_empty(self):
        """Clear an empty bimap."""
        bimap = BiMap()
        bimap.clear()

        self.assertEqual(0, len(bimap))