def test_add(self): ht = HashedSet() assert ht._size() == 0 ht.add('A') assert ht._size() == 1 assert ht.has('A') == True ht.add('B') assert ht._size() == 2 assert ht.has('B') == True
def test_size(self): ht = HashedSet() assert ht._size() == 0 ht.add('A') assert ht._size() == 1 ht.add('B') assert ht._size() == 2 ht.remove('A') assert ht._size() == 1 ht.remove('B') assert ht._size() == 0