Пример #1
0
 def test_double_zero(self):
     self.assertEqual(move_zeroes.move([0, False, 00, 2, 0, 1, "yes"]),
                      [False, 2, 1, "yes", 0, 0, 0])
Пример #2
0
 def test_only_zero(self):
     self.assertEqual(move_zeroes.move([0]), [0])
Пример #3
0
 def test_zero_as_string(self):
     self.assertEqual(move_zeroes.move([0, False, "0", 2, 0, 1, "yes"]),
                      [False, "0", 2, 1, "yes", 0, 0])
Пример #4
0
 def test_zero_and_false(self):
     self.assertEqual(move_zeroes.move([0, False, 0, 2, 0, 1, "yes"]),
                      [False, 2, 1, "yes", 0, 0, 0])
Пример #5
0
 def test_no_zero_but_false(self):
     self.assertEqual(move_zeroes.move([False, 2, 1, "yes"]),
                      [False, 2, 1, "yes"])
Пример #6
0
 def test_no_zero(self):
     self.assertEqual(move_zeroes.move([True, 2, 1, "yes"]),
                      [True, 2, 1, "yes"])
Пример #7
0
 def test_one_and_zero(self):
     self.assertEqual(move_zeroes.move([0, 1]), [1, 0])