tests.test_nats module

Test for integer conversions.

class tests.test_nats.NatsTestCase(methodName='runTest')

Bases: unittest.case.TestCase

Tests for ints.

testCarryIn()

Test carry_in.

Parameters:strategy – the strategy (tuple of value, carry, base)
testExceptions()

Test throwing exception.

testFromInt()

convert_to_int(convert_from_int(value, to_base), 10) == value No leading zeros in convert_from_int(value, to_base)

testFromOther()

Test roundtrip from number in arbitrary base.

Previous topic

tests.test_division module

Next topic

tests.test_radix module

This Page