Exemplo n.º 1
0
 def test_cardinality2_set(self):
     self.assertItemsEqual(self.TRIVIAL_PARTITION_OF_TWO_ELEMS_SET,
                           __unit__.trivial_partition(self.TWO_ELEMS_SET))
Exemplo n.º 2
0
 def test_singleton_set(self):
     set_ = set([42])
     self.assertItemsEqual([set_], __unit__.trivial_partition(set_))
Exemplo n.º 3
0
 def test_cardinality2_iterable(self):
     self.assertItemsEqual(self.TRIVIAL_PARTITION_OF_TWO_ELEMS_TUPLE,
                           __unit__.trivial_partition(self.TWO_ELEMS_TUPLE))
Exemplo n.º 4
0
 def test_empty_set(self):
     self.assertEmpty(__unit__.trivial_partition(set()))
Exemplo n.º 5
0
 def test_singleton_iterable(self):
     self.assertItemsEqual([(42, )], __unit__.trivial_partition([42]))
Exemplo n.º 6
0
 def test_empty_iterable(self):
     self.assertEmpty(__unit__.trivial_partition([]))
Exemplo n.º 7
0
 def test_some_object(self):
     with self.assertRaises(TypeError):
         __unit__.trivial_partition(object())
Exemplo n.º 8
0
 def test_none(self):
     with self.assertRaises(TypeError):
         __unit__.trivial_partition(None)