def test_single(self): """ single test :return: """ # ichiro suzuki(2004) single = Stats.single(262, 8, 24, 5) self.assertEqual(single, 225)
def test_rc2002(self): """ Run created 2002 test :return: """ # ichiro suzuki(2004) single = Stats.single(262, 8, 24, 5) rc = Stats.rc2002(262, 49, 4, 11, 6, 3, 2, 36, 63, 704, 19, single, 24, 5, 8) self.assertEqual(rc, 136.7)
def test_tb(self): """ Total bases test :return: """ # ichiro suzuki(2004) single = Stats.single(262, 8, 24, 5) tb = Stats.tb(single, 8, 24, 5) self.assertEqual(tb, 320)
def test_woba_mlb(self): """ wOBA(MLB) test :return: """ # hayato sakamoto(2016) w_oba = Stats.woba_mlb(81, 0, 114, 28, 3, 23, 488, 6, ibb=2) self.assertEqual(w_oba, 0.427) # tetsuto yamada(2016, non error on bb & ibb) single = Stats.single(146, 38, 26, 3) w_oba = Stats.woba_mlb(97, 8, single, 26, 3, 38, 481, 4) self.assertEqual(w_oba, 0.442)