Пример #1
0
 def test_zero(self):
     self.assertEqual(
         subsets([1], 0),
         set()
     )
Пример #2
0
 def test_two(self):
     self.assertEqual(
         subsets([1, 2, 3], 2),
         set([(1, 2), (1, 3), (2, 3)])
     )
Пример #3
0
 def test_three(self):
     self.assertEqual(
         subsets([1, 2, 3], 3),
         set([(1, 2, 3)])
     )
Пример #4
0
 def test_single(self):
     self.assertEqual(
         subsets([1], 1),
         set([(1,)])
     )