You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
Screenshots
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.
The text was updated successfully, but these errors were encountered:
The only case which fails is the NFL case, and it's because the URL for the 2023 page does not yet have a team list, but you can get a pass by forcing the year to 2022, like
teams = NFLTeams(year=2022)
Output on the slightly modified test.py (adding import unittest and changing NFL year) looks like:
python test.py -v
test_fb_team_goals (__main__.SportsipyTests) ... ok
test_mlb_game_dataframe (__main__.SportsipyTests) ... ok
test_nba_team_names_and_abbreviations (__main__.SportsipyTests) ... ok
test_ncaab_game_dates (__main__.SportsipyTests) ... ok
test_ncaaf_away_interceptions (__main__.SportsipyTests) ... ok
test_nfl_team_information (__main__.SportsipyTests) ... ok
test_nhl_teams_2018 (__main__.SportsipyTests) ... ok
----------------------------------------------------------------------
Ran 7 tests in 4.103s
OK
This particular project does not seem maintained right now, but my fork is mostly working at this point, so feel free to use it as an alternative.
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:
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.
Screenshots
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):
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.
The text was updated successfully, but these errors were encountered: