def test_increment_neq(self): value = Increment(100.7) value2 = Increment(42) self.assertNotEqual(value, value2)
def test_increment_copy(self): value = Increment(100.7) value2 = value.copy() self.assertEqual(value, value2)
def test_increment_copy_and_step(self): value = Increment(100.7) value2 = value.copy() self.assertEqual(value.next(), value2.next())
def test_increment_next_with_custom_stepsize(self): value = Increment(-47.11, 10) self.assertEqual(-37.11, value.next())
def test_increment_next(self): value = Increment(-47.11) self.assertEqual(-46.11, value.next())
def test_increment_init_with_value(self): value = Increment(100.7) self.assertEqual(100.7, value.value)
def test_increment_init_default(self): value = Increment() self.assertEqual(0, value.value)
def test_increment_modify(self): value = Increment(42) with self.assertRaises(AttributeError): value.value = 21