test_utils module

class test_utils.BaseballSituation(only=None, exclude=(), many=False, context=None, load_only=(), dump_only=(), partial=False, unknown=None)[source]

Bases: argschema.schemas.ArgSchema

A description of a baseball situation

This schema is designed to be a schema_type for an ArgSchemaParser object
BaseballSituation
key description default field_type json_type
inning inning (1-9) (REQUIRED) Integer int
outs number of outs (0-2) (REQUIRED) Integer int
log_level set the logging level of the module ERROR LogLevel str
bottom is it the bottom of the inning (REQUIRED) Boolean bool
score_away away team score (non-negative) (REQUIRED) Integer int
pitcher who is pitching (REQUIRED) Player dict
strikes how many strikes (0-2) (REQUIRED) Integer int
balls number of balls (0-4) 0 Integer int
batter who is batting (REQUIRED) Player dict
bases_occupied which bases are occupied NA List int
score_home home team score (non-negative) (REQUIRED) Integer int
opts = <marshmallow.schema.SchemaOpts object>
class test_utils.Player(only=None, exclude=(), many=False, context=None, load_only=(), dump_only=(), partial=False, unknown=None)[source]

Bases: argschema.schemas.DefaultSchema

player information

Player
key description default field_type json_type
number player’s number (must be >0) (REQUIRED) Integer int
name players name (REQUIRED) String str
opts = <marshmallow.schema.SchemaOpts object>
test_utils.test_merge_value_add()[source]
test_utils.test_merge_value_fail()[source]
test_utils.test_merge_value_subtract()[source]
test_utils.test_schema_argparser_with_baseball()[source]
test_utils.test_smart_merge()[source]
test_utils.test_smart_merge_add()[source]
test_utils.test_smart_merge_nested()[source]
test_utils.test_smart_merge_none()[source]
test_utils.test_smart_merge_not_none()[source]
test_utils.test_smart_merge_same()[source]