tests.test_rounding module

Test for integer conversions.

class tests.test_rounding.RoundingTestCase(methodName='runTest')

Bases: unittest.case.TestCase

Tests for rounding methods.

testExceptions()

Test exceptions.

testRoundingUp(value=HypothesisProvided(value=fractions().filter(lambda x: x > 0 and x < 1) | just(Fraction(1, 2))), method=HypothesisProvided(value=sampled_from((_RoundingMethod(Round down.), _RoundingMethod(Round to nearest, down on a tie.), _RoundingMethod(Round to nearest, up on a tie.), _RoundingMethod(Round to nearest, to zero on a tie.), _RoundingMethod(Round to zero.), _RoundingMethod(Round up.))) | sampled_from((_RoundingMethod(Round to nearest, down on a tie.), _RoundingMethod(Round to nearest, up on a tie.), _RoundingMethod(Round to nearest, to zero on a tie.)))))

Verify results.

Previous topic

tests.test_rationals module

This Page