Ejemplo n.º 1
0
def test():
    gid = '0041400122'
    assert game.BoxscoreScoring(gid)
    assert game.BoxscoreUsage(gid)
    assert game.BoxscoreMisc(gid)
    assert game.BoxscoreAdvanced(gid)
    assert game.BoxscoreFourFactors(gid)
    assert game.PlayByPlay(gid)
Ejemplo n.º 2
0
 def testAll(self):
     assert game.BoxscoreSummary(self.gameId)
     assert game.Boxscore(self.gameId)
     assert game.BoxscoreScoring(self.gameId)
     assert game.BoxscoreUsage(self.gameId)
     assert game.BoxscoreMisc(self.gameId)
     assert game.BoxscoreAdvanced(self.gameId)
     assert game.BoxscoreFourFactors(self.gameId)
     assert game.PlayByPlay(self.gameId)
     assert game.HustleStats(self.gameId)
Ejemplo n.º 3
0
    def testBoxScoreScoring(self):
        boxscorescoring = game.BoxscoreScoring(self.gameId)

        playerscoring = boxscorescoring.sql_players_scoring()
        self.assertTrue((26, 24), playerscoring.shape)
        self.assertTrue(
            ('Aaron Gordon' == playerscoring[1:2].PLAYER_NAME).all())

        teamscoring = boxscorescoring.sql_team_scoring()
        self.assertTrue((2, 21), teamscoring.shape)
        self.assertTrue(('Celtics' == teamscoring[1:2].TEAM_NAME).all())
Ejemplo n.º 4
0
def test():
    gid = '0041400122'
    print(game.BoxscoreSummary(gid).line_score())
    assert game.BoxscoreSummary(gid)
    assert game.Boxscore(gid)
    assert game.BoxscoreScoring(gid)
    assert game.BoxscoreUsage(gid)
    assert game.BoxscoreMisc(gid)
    assert game.BoxscoreAdvanced(gid)
    assert game.BoxscoreFourFactors(gid)
    assert game.PlayByPlay(gid)
    assert game.HustleStats(gid)
Ejemplo n.º 5
0
from __future__ import print_function
from nba_py import game

# pbp = game.PlayByPlay('0041400122')
# print pbp.info()
box = game.Boxscore('0041400122')
print(box.game_summary())
bss = game.BoxscoreScoring('0041400122')
print(bss.sql_team_scoring())
bsu = game.BoxscoreUsage('0041400122')
print(bsu.sql_team_usage())
bsa = game.BoxscoreAdvanced('0041400122')
print(bsa.sql_team_advanced())
bsf = game.BoxscoreFourFactors('0041400122')
print(bsf.sql_team_four_factors())
pt = game.PlayerTracking('0041400122')
print(pt.info())
Ejemplo n.º 6
0
def boxscore_scoring(game_id, start_period, end_period, start_range,
                     end_range, range_type):
    return game.BoxscoreScoring(game_id, start_period=start_period,
                                end_period=end_period, start_range=start_range,
                                end_range=end_range, range_type=range_type)