def test_compact(self): self.assertEqual([True, 1, 0.1, "non-empty", [""], (0, ), { "a": 1 }], list( iters.compact([ None, False, True, 0, 1, 0.0, 0.1, "", "non-empty", [], [""], (), (0, ), {}, { "a": 1 } ])))
def test_compact(self): self.assertEqual([True, 1, 0.1, "non-empty", [""], (0,), {"a": 1}], list(iters.compact([None, False, True, 0, 1, 0.0, 0.1, "", "non-empty", [], [""], (), (0,), {}, {"a": 1}])))