Ejemplo n.º 1
0
 def test_negatives(self):
     """Test na liście z ujemnym elementem."""
     self.assertEqual(even_elements([-31, 0, 2]), [-31, 2])
Ejemplo n.º 2
0
 def test_singleton(self):
     """Test na liście jednoelementowej."""
     self.assertEqual(even_elements([41]), [41])
Ejemplo n.º 3
0
 def test_two_elements(self):
     """Test na liście dwuelementowej."""
     self.assertEqual(even_elements([100, 2]), [100])
Ejemplo n.º 4
0
 def test_sequence(self):
     """Prosty test."""
     self.assertEqual(even_elements([1, 2, 3, 4, 5, 6]), [1, 3, 5])
Ejemplo n.º 5
0
 def test_empty(self):
     """Test na pustej liście."""
     self.assertEqual(even_elements([]), [])
Ejemplo n.º 6
0
 def test_negatives(self):
     """Test na liście z ujemnym elementem."""
     self.assertEqual(even_elements([-31, 0, 2]), [-31, 2])
Ejemplo n.º 7
0
 def test_two_elements(self):
     """Test na liście dwuelementowej."""
     self.assertEqual(even_elements([100, 2]), [100])
Ejemplo n.º 8
0
 def test_singleton(self):
     """Test na liście jednoelementowej."""
     self.assertEqual(even_elements([41]), [41])
Ejemplo n.º 9
0
 def test_empty(self):
     """Test na pustej liście."""
     self.assertEqual(even_elements([]), [])
Ejemplo n.º 10
0
 def test_sequence(self):
     """Prosty test."""
     self.assertEqual(even_elements([1, 2, 3, 4, 5, 6]), [1, 3, 5])