tests.size.size_test module

Tests for behavior of Size objects.

class tests.size.size_test.ComputationTestCase(methodName='runTest')

Bases: unittest.case.TestCase

Test setting configuration for computation.

setUp()

Get current config.

tearDown()

Reset configuration to default.

testFractionalBytes()

Test that error is raised on fractional bytes when EXACT is True.

class tests.size.size_test.ConfigurationTestCase(methodName='runTest')

Bases: unittest.case.TestCase

Test setting configuration for display.

setUp()

Get current config.

tearDown()

Reset configuration to default.

testSettingConfiguration()

Test that setting configuration to different values has effect.

testStrConfigs()

Test str with various configuration options.

testStrWithSmallDeviations()

Behavior when deviation from whole value is small.

class tests.size.size_test.ConstructionTestCase(methodName='runTest')

Bases: unittest.case.TestCase

Test construction of Size objects.

testConstructor()

Test error checking in constructo.

testFraction()

Test creating Size with Fraction.

testNegative()

Test construction of negative sizes.

testNoUnitsInString()

Test construction w/ no units specified.

testZero()

Test construction with 0 as decimal.

class tests.size.size_test.DisplayTestCase(methodName='runTest')

Bases: unittest.case.TestCase

Test formatting Size for display.

testExceptionValues()

Test that exceptions are properly raised on bad params.

testHumanReadableFractionalQuantities()

Test behavior when the displayed value is a fraction of units.

testMinValue()

Test behavior on min_value parameter.

testRoundingToBytes()

Test that second part is B when rounding to bytes.

testSIUnits()

Test binary_units param.

testStr()

Test construction of display components.

Previous topic

tests.size.operations_test module

Next topic

tests.config_test module

This Page