[Tutor] Need help with two similar test cases that I have written. One works and the other fails
Danny Yoo
danny.yoo at gmail.com
Sun Feb 7 11:38:28 EST 2016
:
>
> def test_red_temperature_simulation(self):
> """
> Method to test the red_temperature_simulation method
> """
> for i in range(1000000):
> test_value = red_temperature_simulation()
> self.assertTrue((test_value < 100.0) or (test_value > 103.0),
> msg="Test failed for {}".format(test_value))
>
> And now everything works the way it should.
>
Be careful. Now you have a test that always succeeds.
More information about the Tutor
mailing list