test_utils module¶
-
class
test_utils.BaseballSituation(extra=None, only=(), exclude=(), prefix=u'', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]¶ Bases:
argschema.schemas.ArgSchemaA description of a baseball situation
This schema is designed to be a schema_type for an ArgSchemaParser objectBaseballSituation¶ key description default field_type json_type inning inning (1-9) (REQUIRED) Integerint outs number of outs (0-2) (REQUIRED) Integerint log_level set the logging level of the module ERROR LogLevelunicode bottom is it the bottom of the inning (REQUIRED) Booleanbool score_away away team score (non-negative) (REQUIRED) Integerint pitcher who is pitching (REQUIRED) Playerdict strikes how many strikes (0-2) (REQUIRED) Integerint input_json file path of input json file NA InputFileunicode balls number of balls (0-4) 0 Integerint batter who is batting (REQUIRED) Playerdict bases_occupied which bases are occupied NA Listint output_json file path to output json file NA OutputFileunicode score_home home team score (non-negative) (REQUIRED) Integerint -
opts= <marshmallow.schema.SchemaOpts object>¶
-
-
class
test_utils.Player(extra=None, only=(), exclude=(), prefix=u'', strict=None, many=False, context=None, load_only=(), dump_only=(), partial=False)[source]¶ Bases:
argschema.schemas.DefaultSchemaplayer information
Player¶ key description default field_type json_type number player’s number (must be >0) (REQUIRED) Integerint name players name (REQUIRED) Stringunicode -
opts= <marshmallow.schema.SchemaOpts object>¶
-