def test_get_game_number(self): """ Game number Test """ self.assertEqual(MlbAm._get_game_number('gid_2015_08_12_balmlb_seamlb_1/'), 1) self.assertEqual(MlbAm._get_game_number('gid_2015_05_06_arimlb_colmlb_1/'), 1) self.assertEqual(MlbAm._get_game_number('gid_2015_05_06_arimlb_colmlb_2/'), 2) self.assertEqual(MlbAm._get_game_number('gid_2015_09_12_detmlb_clemlb_1_bak/'), 1)
def test_get_game_number(self): """ Game number Test """ self.assertEqual( MlbAm._get_game_number('gid_2015_08_12_balmlb_seamlb_1/'), 1) self.assertEqual( MlbAm._get_game_number('gid_2015_05_06_arimlb_colmlb_1/'), 1) self.assertEqual( MlbAm._get_game_number('gid_2015_05_06_arimlb_colmlb_2/'), 2) self.assertEqual( MlbAm._get_game_number('gid_2015_09_12_detmlb_clemlb_1_bak/'), 1)
def main(start, end, out): """ Scrape a MLBAM Data :param start: Start Day(YYYYMMDD) :param end: End Day(YYYYMMDD) :param out: Output directory(default:"../output/mlb") """ try: logging.basicConfig(level=logging.WARNING) MlbAm.scrape(start, end, out) except MlbAmBadParameter as e: raise click.BadParameter(e)