tests.size.operations_test module

Tests for operations on Range objects.

class tests.size.operations_test.AdditionTestCase(methodName='runTest')

Bases: unittest.case.TestCase

Test addition.

testAddition()

Test addition.

testExceptions()

Any non-size other raises an exception.

class tests.size.operations_test.ArithmeticPropertiesTestCase(methodName='runTest')

Bases: unittest.case.TestCase

Verify that distributive property holds.

testAssociativity()

Assert associativity across sizes.

testDistributivity1()

Assert distributivity across numbers.

testDistributivity2()

Assert distributivity across sizes.

class tests.size.operations_test.DivmodTestCase(methodName='runTest')

Bases: unittest.case.TestCase

Test divmod.

testDivmodWithNumber()

Test divmod with a number.

testDivmodWithRange()

Test divmod with a size.

testExceptions()

Test that exceptions are thrown.

class tests.size.operations_test.FloordivTestCase(methodName='runTest')

Bases: unittest.case.TestCase

Test floordiv.

testExceptions()

Test that exceptions are thrown.

testFloordivWithNumber()

Test floordiv with a number.

testFloordivWithRange()

Test floordiv with a size.

class tests.size.operations_test.ModTestCase(methodName='runTest')

Bases: unittest.case.TestCase

Test mod.

testExceptions()

Test that exceptions are thrown.

testModWithNumber()

Test mod with a number.

testModWithRange()

Test mod with a size.

class tests.size.operations_test.MultiplicationTestCase(methodName='runTest')

Bases: unittest.case.TestCase

Test multiplication.

testExceptions()

Range others are unrepresentable.

testMultiplication()

Test multiplication.

class tests.size.operations_test.RdivmodTestCase(methodName='runTest')

Bases: unittest.case.TestCase

Test rdivmod.

testExceptions()

Test that exceptions are thrown.

testRdivmodWithRange()

Test divmod with a size.

class tests.size.operations_test.RfloordivTestCase(methodName='runTest')

Bases: unittest.case.TestCase

Test rfloordiv.

testExceptions()

Test that exceptions are thrown.

testRfloordivWithRange()

Test floordiv with a size.

class tests.size.operations_test.RmodTestCase(methodName='runTest')

Bases: unittest.case.TestCase

Test rmod.

testExceptions()

Test that exceptions are thrown.

testRmodWithRange()

Test rmod with a size.

class tests.size.operations_test.RsubTestCase(methodName='runTest')

Bases: unittest.case.TestCase

Test rsub.

testExceptions()

Any non-size other raises an exception.

testRsub()

Test __rsub__.

class tests.size.operations_test.RtruedivTestCase(methodName='runTest')

Bases: unittest.case.TestCase

Test rtruediv.

testExceptions()

Test that exceptions are thrown.

testTruedivWithRange()

Test truediv with a size.

class tests.size.operations_test.SubtractionTestCase(methodName='runTest')

Bases: unittest.case.TestCase

Test subtraction.

testExceptions()

Any non-size other raises an exception.

testSubtraction()

Test subtraction.

class tests.size.operations_test.TruedivTestCase(methodName='runTest')

Bases: unittest.case.TestCase

Test truediv.

testExceptions()

Test that exceptions are thrown.

testTruedivWithNumber()

Test truediv with a number.

testTruedivWithRange()

Test truediv with a size.

class tests.size.operations_test.UnaryOperatorsTestCase(methodName='runTest')

Bases: unittest.case.TestCase

Test unary operators.

testAbs()

Test absolute value.

testHash()

Test that hash has the necessary property for hash table lookup.

testNeg()

Test negation.

testPos()

Test positive.

class tests.size.operations_test.UtilityMethodsTestCase(methodName='runTest')

Bases: unittest.case.TestCase

Test operator methods and other methods with an ‘_’.

testBinaryOperatorsBoolean()

Test binary operators with a boolean result.

testBinaryOperatorsRange()

Test binary operators with a possible Range result.

testOtherMethods()

Test miscellaneous non-operator methods.

testUnaryOperators()

Test unary operators.

Previous topic

tests.size.named_test module

Next topic

tests.size.size_test module

This Page