tests.config_test module
Test for configuration classes.
-
class tests.config_test.ConfigTestCase(methodName='runTest')
Bases: unittest.case.TestCase
Exercise methods of output configuration classes.
-
testStrConfigObject()
Miscellaneous tests for string configuration.
-
class tests.config_test.InputTestCase(methodName='runTest')
Bases: unittest.case.TestCase
Exercise methods of input configuration classes.
-
testInputConfigObject()
Miscellaneous tests for input configuration.
-
class tests.config_test.SizeTestCase(methodName='runTest')
Bases: unittest.case.TestCase
Test Size configuration.
-
setUp()
-
tearDown()
-
testSettingInputConfig(config=HypothesisProvided(value=builds(<class 'bytesize._config.InputConfig'>, method=sampled_from((Round down., Round to nearest, down on a tie., Round to nearest, up on a tie., Round up.)), unit=sampled_from((B, KiB, MiB, GiB, TiB, PiB, EiB, ZiB, YiB, kB, MB, GB, TB, PB, EB, ZB, YB)))))
That that new input config is the correct one.
-
testSettingStrConfig(config=HypothesisProvided(value=builds(<class 'bytesize._config.StrConfig'>, binary_units=booleans(), exact_value=booleans(), max_places=integers().filter(lambda x: x >= 0), min_value=fractions(), show_approx_str=booleans(), strip=booleans())))
Test that new str config is the correct one.