-
Notifications
You must be signed in to change notification settings - Fork 196
Description
Describe the bug
Currently, Sportsipy is not working on this branch for even the basic examples on the README.
To Reproduce
The contents of this Unit Test:
from sportsipy.nhl.teams import Teams as NHLTeams
from sportsipy.nba.teams import Teams as NBATeams
from sportsipy.nfl.teams import Teams as NFLTeams
from sportsipy.ncaab.schedule import Schedule as NCAABSchedule
from sportsipy.ncaaf.boxscore import Boxscore as NCAAFBoxscore
from sportsipy.mlb.boxscore import Boxscore as MLBBoxscore
from sportsipy.fb.team import Team as FBTeam
class SportsipyTests(unittest.TestCase):
def test_nhl_teams_2018(self):
teams = NHLTeams(2018)
self.assertTrue(isinstance(teams, NHLTeams))
def test_nba_team_names_and_abbreviations(self):
teams = NBATeams()
for team in teams:
self.assertTrue(isinstance(team.name, str))
self.assertTrue(isinstance(team.abbreviation, str))
def test_nfl_team_information(self):
teams = NFLTeams()
lions = teams('DET')
self.assertTrue(lions)
def test_ncaab_game_dates(self):
purdue_schedule = NCAABSchedule('purdue')
for game in purdue_schedule:
self.assertTrue(isinstance(game.date, str))
def test_ncaaf_away_interceptions(self):
championship_game = NCAAFBoxscore('2018-01-08-georgia')
self.assertTrue(isinstance(championship_game.away_interceptions, int))
def test_mlb_game_dataframe(self):
game = MLBBoxscore('BOS201806070')
self.assertTrue(hasattr(game, 'dataframe'))
def test_fb_team_goals(self):
tottenham = FBTeam('Tottenham Hotspur')
self.assertTrue(isinstance(tottenham.goals_scored, int))
if __name__ == "__main__":
unittest.main()
Expected behavior
The expected behavior is for prints, equality found or asserts to be true for the provided test. Currently, these are not returning the expected results.
As seen in the screenshot, what I have also noticed in additional NBA statistics specific testing, is that the first line is interacting with the data on sports-references.com but nothing is being returned.
Desktop (please complete the following information):
- OS: Windows 10 Home x64
- Sportsipy Version: 0.6.0
Additional context
Is the issue possibly related to URI changes on sports-references.com? Is there a simple fix or is this software being made obsolete in favor of a new project of similar design? If needed and relevant, I can provide more tests that show active interaction with the source website but do not reveal results. I appreciate any suggestions or acknowledgement on how to proceed.
