tests.test_radix module

Test for rational conversions.

class tests.test_radix.RadixTestCase(methodName='runTest')

Bases: unittest.case.TestCase

Tests for radix.

testEquality()

Test == operator.

testExceptions()

Test exceptions.

testInBase()

Test that roundtrip is identity.

testInBase2()

Test conversion to current base.

testInEquality()

Test != operator.

testOperatorExceptions()

Test that comparsion operators yield exceptions.

testOptions()

Skip validation and canonicalization.

testRepeatingRepeatPart()

Repeat part is made up of repeating parts.

testStr()

Make sure that __str__ executes.

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

Bases: unittest.case.TestCase

Tests for rounding Radixes.

testAsInt()

Test equivalence with two paths.

testExactLength()

Require conversion, but do not carry out of repeating_part. Ensure that the intermediate result is exactly the required precision.

testExceptions()

Test exception.

testFiveEighths()

Test 5/8 in base 3.

testLeadingZeros()

Require conversion, but do not carry out of repeating_part.

testMiddles()

Ensure that there is no tie breaker.

testOneHalf()

Test 1/2 in base 3.

testOverflow()

Ensure that rounding causes overflow.

testRoundFraction()

Test that rounding yields the correct number of digits.

Test that rounded values are in a good range.

testRoundRelation()

Test that all results have the correct relation.

Previous topic

tests.test_nats module

Next topic

tests.test_rationals module

This Page