Module Expr Str ImportFrom alias Import alias Import alias Import alias ClassDef bases NameLoad body FunctionDef arguments args NameParam defaults body Expr Str Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str keyword AttributeLoad AttributeLoad NameLoad attr attr Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str keyword AttributeLoad AttributeLoad NameLoad attr attr keyword Num decorator_list FunctionDef arguments args NameParam NameParam defaults body Return Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Return Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Num AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Num AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Num AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Str With Call AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Num AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Num AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Str With Call AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad decorator_list decorator_list
N/A N/A 
Test the argparse 'BitmathType' integration
 N/A TestCase N/A bitmath.integrations N/A argparse N/A shlex TestArgparseType N/A TestCase N/A setUp N/A N/A self N/A N/A N/A Needful for the tests N/A N/A self parser_one_arg N/A N/A argparse ArgumentParser N/A N/A N/A N/A self parser_one_arg add_argument --one-arg type N/A N/A bitmath integrations BitmathType N/A N/A self parser_two_args N/A N/A argparse ArgumentParser N/A N/A N/A N/A self parser_two_args add_argument --two-args type N/A N/A bitmath integrations BitmathType nargs 2 N/A _parse_one_arg N/A N/A self arg_str N/A N/A N/A N/A N/A N/A self parser_one_arg parse_args N/A N/A shlex split arg_str N/A _parse_two_args N/A N/A self arg_str N/A N/A N/A N/A N/A N/A self parser_two_args parse_args N/A N/A shlex split arg_str N/A test_BitmathType_good_one_arg N/A N/A self N/A N/A N/A Argparse: BitmathType - Works when given a correct parameter N/A args --one-arg 1000EB N/A result N/A N/A self _parse_one_arg args N/A N/A N/A self assertEqual N/A N/A bitmath EB 1000 N/A result one_arg N/A test_BitmathType_good_two_args N/A N/A self N/A N/A N/A Argparse: BitmathType - Works when given two correct parameters N/A args --two-args 1337B 0.001GiB N/A result N/A N/A self _parse_two_args args N/A N/A N/A self assertEqual N/A len N/A result two_args 2 N/A N/A N/A self assertIn N/A N/A bitmath Byte 1337 N/A result two_args N/A N/A N/A self assertIn N/A N/A bitmath GiB 0.001 N/A result two_args N/A test_BitmathType_bad_wtfareyoudoing N/A N/A self N/A N/A N/A Argparse: BitmathType - Notices when horrendously incorrect args are provided N/A args --one-arg 2098329324kdsjflksdjf N/A N/A N/A self assertRaises SystemExit N/A N/A N/A N/A self _parse_one_arg args N/A test_BitmathType_good_spaces_in_value N/A N/A self N/A N/A N/A Argparse: BitmathType - 'Quoted values' can be separated from the units by whitespace N/A args --two-args '100 MiB' '200 KiB' N/A result N/A N/A self _parse_two_args args N/A N/A N/A self assertEqual N/A len N/A result two_args 2 N/A N/A N/A self assertIn N/A N/A bitmath MiB 100 N/A result two_args N/A N/A N/A self assertIn N/A N/A bitmath KiB 200 N/A result two_args N/A test_BitmathType_bad_spaces_in_value N/A N/A self N/A N/A N/A Argparse: BitmathType - Unquoted values separated from their units are detected N/A args --one-arg 1337 B N/A N/A N/A self assertRaises SystemExit N/A N/A N/A N/A self _parse_one_arg args N/A N/A