Example #1
0
 def test_simple_case(self):
     self.assertEqual([
         (3, 0, 0),
         (2, 1, 0),
         (1, 2, 0),
         (2, 0, 1),
         (1, 1, 1),
         (1, 0, 2),
     ], list(vectors3(3)))
Example #2
0
 def test_sums(self):
     sums = [sum(t) for t in vectors3(5)]
     self.assertEqual(15, len(sums))
     self.assertTrue(all(v == 5 for v in sums))