class MLBStandingsTest(unittest.TestCase): def __init__(self, testname, startDate, endDate): super(MLBStandingsTest, self).__init__(testname) self.setup(startDate, endDate) def setup(self, startDate, endDate): self.mlb_stats = MLBStandings(startDate, endDate) def testFrameLength(self): # this checks to make sure that we've grabbed every row we want. # confirms that the data flow from the web to the frame works right. lenFrame = 5460 standings = self.mlb_stats.getMasterStandings() self.assertEqual(len(standings), lenFrame)
def setup(self, startDate, endDate): self.mlb_stats = MLBStandings(startDate, endDate)