Exemple #1
0
 def test_increment_neq(self):
     value = Increment(100.7)
     value2 = Increment(42)
     self.assertNotEqual(value, value2)
Exemple #2
0
 def test_increment_copy(self):
     value = Increment(100.7)
     value2 = value.copy()
     self.assertEqual(value, value2)
Exemple #3
0
 def test_increment_copy_and_step(self):
     value = Increment(100.7)
     value2 = value.copy()
     self.assertEqual(value.next(), value2.next())
Exemple #4
0
 def test_increment_next_with_custom_stepsize(self):
     value = Increment(-47.11, 10)
     self.assertEqual(-37.11, value.next())
Exemple #5
0
 def test_increment_next(self):
     value = Increment(-47.11)
     self.assertEqual(-46.11, value.next())
Exemple #6
0
 def test_increment_init_with_value(self):
     value = Increment(100.7)
     self.assertEqual(100.7, value.value)
Exemple #7
0
 def test_increment_init_default(self):
     value = Increment()
     self.assertEqual(0, value.value)
Exemple #8
0
 def test_increment_modify(self):
     value = Increment(42)
     with self.assertRaises(AttributeError):
         value.value = 21