repo_id
stringclasses
400 values
commit_sha
stringclasses
400 values
commit_index
int32
0
951
in_repo_split
stringclasses
1 value
cross_repo_split
stringclasses
1 value
test_file
stringlengths
7
121
test_function
stringlengths
1
108
assertion_type
stringclasses
32 values
difficulty
stringclasses
8 values
context_lines
int32
3
600
prefix
large_stringlengths
44
113k
target
large_stringlengths
1
498
anchor_sha
stringclasses
400 values
anchor_index
int32
0
951
qna_source
stringclasses
1 value
swar/nba_api
45f4fec38889f98ab0b5d68bcdd6d3230898c107
23
train
train
tests/unit/test_parameters.py
test_season_type_base
assert
string_literal
16
from nba_api.stats.library.parameters import ( Season, SeasonType, SeasonTypePlayoffs, SeasonTypeAllStar, SeasonTypeNullable, SeasonTypeAllStarNullable, _NotRequired ) import re def test_season_type_base(): assert SeasonType.regular == "Regular Season" assert SeasonType.preseaso...
"PlayIn"
45f4fec38889f98ab0b5d68bcdd6d3230898c107
23
v2_extractor_at_anchor
swar/nba_api
45f4fec38889f98ab0b5d68bcdd6d3230898c107
23
train
train
tests/unit/stats/endpoints/test_dunkscoreleaders.py
test_endpoint_initialization_without_request
assert
string_literal
20
from typing import Any, Dict from unittest.mock import Mock, patch import pytest from nba_api.stats.endpoints import DunkScoreLeaders from .data.dunkscoreleaders import DUNKSCORELEADERS_SAMPLE def json_fixture() -> Dict[str, Any]: """Load the DunkScoreLeaders fixture.""" return DUNKSCORELEADERS_SAMPLE class...
"2024-25"
45f4fec38889f98ab0b5d68bcdd6d3230898c107
23
v2_extractor_at_anchor
swar/nba_api
45f4fec38889f98ab0b5d68bcdd6d3230898c107
23
train
train
tests/unit/stats/endpoints/test_dunkscoreleaders.py
test_endpoint_initialization_with_filters
assert
string_literal
27
from typing import Any, Dict from unittest.mock import Mock, patch import pytest from nba_api.stats.endpoints import DunkScoreLeaders from .data.dunkscoreleaders import DUNKSCORELEADERS_SAMPLE def json_fixture() -> Dict[str, Any]: """Load the DunkScoreLeaders fixture.""" return DUNKSCORELEADERS_SAMPLE class...
"1630168"
45f4fec38889f98ab0b5d68bcdd6d3230898c107
23
v2_extractor_at_anchor
swar/nba_api
45f4fec38889f98ab0b5d68bcdd6d3230898c107
23
train
train
tests/unit/stats/endpoints/test_teamdashlineups.py
test_endpoint_initialization_without_request
assert
string_literal
25
from typing import Any, Dict from unittest.mock import Mock, patch import pytest from nba_api.stats.endpoints import TeamDashLineups from .data.teamdashlineups import TEAMDASHLINEUPS_SAMPLE def json_fixture() -> Dict[str, Any]: """Load the TeamDashLineups fixture.""" return TEAMDASHLINEUPS_SAMPLE class Test...
"2024-25"
45f4fec38889f98ab0b5d68bcdd6d3230898c107
23
v2_extractor_at_anchor
swar/nba_api
45f4fec38889f98ab0b5d68bcdd6d3230898c107
23
train
train
tests/unit/test_parameters.py
test_season_type_playoffs
assert
string_literal
16
from nba_api.stats.library.parameters import ( Season, SeasonType, SeasonTypePlayoffs, SeasonTypeAllStar, SeasonTypeNullable, SeasonTypeAllStarNullable, _NotRequired ) import re def test_season_type_playoffs(): assert SeasonTypePlayoffs.regular == "Regular Season" assert SeasonT...
"Playoffs"
45f4fec38889f98ab0b5d68bcdd6d3230898c107
23
v2_extractor_at_anchor
swar/nba_api
45f4fec38889f98ab0b5d68bcdd6d3230898c107
23
train
train
tests/unit/test_parameters.py
test_season_type_all_star
assert
string_literal
18
from nba_api.stats.library.parameters import ( Season, SeasonType, SeasonTypePlayoffs, SeasonTypeAllStar, SeasonTypeNullable, SeasonTypeAllStarNullable, _NotRequired ) import re def test_season_type_all_star(): assert SeasonTypeAllStar.regular == "Regular Season" assert SeasonTy...
"All Star"
45f4fec38889f98ab0b5d68bcdd6d3230898c107
23
v2_extractor_at_anchor
swar/nba_api
45f4fec38889f98ab0b5d68bcdd6d3230898c107
23
train
train
tests/unit/stats/endpoints/test_scoreboardv3.py
test_endpoint_initialization_without_request
assert
string_literal
18
import pytest from unittest.mock import Mock, patch from nba_api.stats.endpoints import ScoreboardV3 from nba_api.stats.endpoints._parsers.scoreboardv3 import ( NBAStatsScoreboardV3Parser, ) from .data.scoreboardv3 import SCOREBOARDV3_SAMPLE class TestScoreboardV3Endpoint: def test_endpoint_initialization_w...
"2025-11-05"
45f4fec38889f98ab0b5d68bcdd6d3230898c107
23
v2_extractor_at_anchor
swar/nba_api
45f4fec38889f98ab0b5d68bcdd6d3230898c107
23
train
train
tests/unit/test_live_scoreboard.py
test_get_score_board_date
assert
string_literal
336
import json import pytest from nba_api.library.http import NBAHTTP, NBAResponse from nba_api.live.nba.endpoints import scoreboard from nba_api.live.nba.library.http import NBALiveHTTP content = { "meta": { "version": 1, "request": "https://nba-prod-us-east-1-mediaops-stats.s3.amazonaws.com/NBA/live...
"2021-01-16"
45f4fec38889f98ab0b5d68bcdd6d3230898c107
23
v2_extractor_at_anchor
swar/nba_api
45f4fec38889f98ab0b5d68bcdd6d3230898c107
23
train
train
tests/unit/test_parameters.py
test_season_type_base
assert
string_literal
15
from nba_api.stats.library.parameters import ( Season, SeasonType, SeasonTypePlayoffs, SeasonTypeAllStar, SeasonTypeNullable, SeasonTypeAllStarNullable, _NotRequired ) import re def test_season_type_base(): assert SeasonType.regular == "Regular Season" assert SeasonType.preseas...
"Pre Season"
45f4fec38889f98ab0b5d68bcdd6d3230898c107
23
v2_extractor_at_anchor
swar/nba_api
45f4fec38889f98ab0b5d68bcdd6d3230898c107
23
train
train
tests/unit/stats/endpoints/test_scoreboardv3.py
test_endpoint_initialization_without_request
assert
string_literal
20
import pytest from unittest.mock import Mock, patch from nba_api.stats.endpoints import ScoreboardV3 from nba_api.stats.endpoints._parsers.scoreboardv3 import ( NBAStatsScoreboardV3Parser, ) from .data.scoreboardv3 import SCOREBOARDV3_SAMPLE class TestScoreboardV3Endpoint: def test_endpoint_initialization_w...
"scoreboardv3"
45f4fec38889f98ab0b5d68bcdd6d3230898c107
23
v2_extractor_at_anchor
swar/nba_api
45f4fec38889f98ab0b5d68bcdd6d3230898c107
23
train
train
tests/unit/stats/endpoints/test_scheduleleaguev2_parser.py
test_get_points_leaders_keys
assert
variable
44
import json import pytest from pathlib import Path from nba_api.stats.endpoints._parsers.scheduleleaguev2 import ( NBAStatsScheduleLeagueV2Parser, ) def json_fixture(): """Load the ScheduleLeagueV2 JSON fixture.""" fixture_path = ( Path(__file__).parents[4] / "docs" / "nba_api" ...
keys
45f4fec38889f98ab0b5d68bcdd6d3230898c107
23
v2_extractor_at_anchor
swar/nba_api
45f4fec38889f98ab0b5d68bcdd6d3230898c107
23
train
train
tests/unit/stats/endpoints/test_boxscoremiscv3_parser.py
test_team_headers_structure
assert
variable
29
import pytest from nba_api.stats.endpoints._parsers.boxscoremiscv3 import ( NBAStatsBoxscoreMiscV3Parser, TEAM_METADATA_FIELDS, PLAYER_METADATA_FIELDS, MISC_STATS_FIELDS, ) from .data.boxscoremiscv3 import BOXSCOREMISCV3_SAMPLE def json_fixture(): """Return the boxscoremiscv3 sample fixture.""" ...
field
45f4fec38889f98ab0b5d68bcdd6d3230898c107
23
v2_extractor_at_anchor
swar/nba_api
45f4fec38889f98ab0b5d68bcdd6d3230898c107
23
train
train
tests/unit/stats/endpoints/test_scheduleleaguev2_parser.py
test_get_broadcaster_types
assert
variable
49
import json import pytest from pathlib import Path from nba_api.stats.endpoints._parsers.scheduleleaguev2 import ( NBAStatsScheduleLeagueV2Parser, ) def json_fixture(): """Load the ScheduleLeagueV2 JSON fixture.""" fixture_path = ( Path(__file__).parents[4] / "docs" / "nba_api" ...
types
45f4fec38889f98ab0b5d68bcdd6d3230898c107
23
v2_extractor_at_anchor
swar/nba_api
45f4fec38889f98ab0b5d68bcdd6d3230898c107
23
train
train
tests/unit/test_live_scoreboard.py
test_get_games_dict
assert
variable
336
import json import pytest from nba_api.library.http import NBAHTTP, NBAResponse from nba_api.live.nba.endpoints import scoreboard from nba_api.live.nba.library.http import NBALiveHTTP content = { "meta": { "version": 1, "request": "https://nba-prod-us-east-1-mediaops-stats.s3.amazonaws.com/NBA/live...
games
45f4fec38889f98ab0b5d68bcdd6d3230898c107
23
v2_extractor_at_anchor
swar/nba_api
45f4fec38889f98ab0b5d68bcdd6d3230898c107
23
train
train
tests/unit/stats/endpoints/test_boxscoreadvancedv3_parser.py
test_parser_with_full_response
assert
variable
38
import json from pathlib import Path import pytest from nba_api.stats.endpoints._parsers.boxscoreadvancedv3 import ( NBAStatsBoxscoreAdvancedV3Parser, ) from .data.boxscoreadvancedv3 import BOXSCOREADVANCEDV3_SAMPLE def parser(): """Create parser instance with minimal test fixture.""" return NBAStatsBox...
result
45f4fec38889f98ab0b5d68bcdd6d3230898c107
23
v2_extractor_at_anchor
swar/nba_api
45f4fec38889f98ab0b5d68bcdd6d3230898c107
23
train
train
tests/unit/stats/endpoints/test_boxscoredefensivev2_parser.py
test_parser_with_full_response
assert
variable
38
import json from pathlib import Path import pytest from nba_api.stats.endpoints._parsers.boxscoredefensivev2 import ( NBAStatsBoxscoreDefensiveV2Parser, ) from .data.boxscoredefensivev2 import BOXSCOREDEFENSIVEV2_SAMPLE def parser(): """Create parser instance with minimal test fixture.""" return NBAStat...
result
45f4fec38889f98ab0b5d68bcdd6d3230898c107
23
v2_extractor_at_anchor
swar/nba_api
45f4fec38889f98ab0b5d68bcdd6d3230898c107
23
train
train
tests/unit/stats/endpoints/test_boxscorefourfactorsv3_parser.py
test_parser_with_full_response
assert
variable
38
import json from pathlib import Path import pytest from nba_api.stats.endpoints._parsers.boxscorefourfactorsv3 import ( NBAStatsBoxscoreFourFactorsV3Parser, ) from .data.boxscorefourfactorsv3 import BOXSCOREFOURFACTORSV3_SAMPLE def parser(): """Create parser instance with minimal test fixture.""" return...
result
45f4fec38889f98ab0b5d68bcdd6d3230898c107
23
v2_extractor_at_anchor
swar/nba_api
45f4fec38889f98ab0b5d68bcdd6d3230898c107
23
train
train
tests/unit/stats/endpoints/test_boxscorehustlev2_parser.py
test_get_data_sets
assert
variable
38
import json import pytest from pathlib import Path from nba_api.stats.endpoints._parsers.boxscorehustlev2 import ( NBAStatsBoxscoreHustleV2Parser, ) def json_fixture(): """Load the BoxScoreHustleV2 JSON fixture.""" fixture_path = ( Path(__file__).parents[4] / "docs" / "nba_api" ...
result
45f4fec38889f98ab0b5d68bcdd6d3230898c107
23
v2_extractor_at_anchor
swar/nba_api
45f4fec38889f98ab0b5d68bcdd6d3230898c107
23
train
train
tests/unit/stats/endpoints/test_boxscorematchupsv3_parser.py
test_get_data_sets
assert
variable
38
import json import pytest from pathlib import Path from nba_api.stats.endpoints._parsers.boxscorematchupsv3 import ( NBAStatsBoxscoreMatchupsParserV3, ) def json_fixture(): """Load the BoxScoreMatchupsV3 JSON fixture.""" fixture_path = ( Path(__file__).parents[4] / "docs" / "nba_ap...
result
45f4fec38889f98ab0b5d68bcdd6d3230898c107
23
v2_extractor_at_anchor
swar/nba_api
45f4fec38889f98ab0b5d68bcdd6d3230898c107
23
train
train
tests/unit/stats/endpoints/test_dunkscoreleaders.py
test_json_fixture_structure
assert
variable
22
from typing import Any, Dict from unittest.mock import Mock, patch import pytest from nba_api.stats.endpoints import DunkScoreLeaders from .data.dunkscoreleaders import DUNKSCORELEADERS_SAMPLE def json_fixture() -> Dict[str, Any]: """Load the DunkScoreLeaders fixture.""" return DUNKSCORELEADERS_SAMPLE class...
params
45f4fec38889f98ab0b5d68bcdd6d3230898c107
23
v2_extractor_at_anchor
swar/nba_api
45f4fec38889f98ab0b5d68bcdd6d3230898c107
23
train
train
tests/unit/stats/endpoints/test_iststandings_parser.py
test_get_data_sets
assert
variable
38
import json import pytest from pathlib import Path from nba_api.stats.endpoints._parsers.iststandings import ( NBAStatsISTStandingsParser, ) def json_fixture(): """Load the ISTStandings JSON fixture.""" fixture_path = ( Path(__file__).parents[4] / "docs" / "nba_api" / "stat...
result
45f4fec38889f98ab0b5d68bcdd6d3230898c107
23
v2_extractor_at_anchor
swar/nba_api
45f4fec38889f98ab0b5d68bcdd6d3230898c107
23
train
train
tests/unit/stats/endpoints/test_playbyplayv3_parser.py
test_get_data_sets
assert
variable
38
import json import pytest from pathlib import Path from nba_api.stats.endpoints._parsers.playbyplayv3 import ( NBAStatsPlayByPlayParserV3, ) def json_fixture(): """Load the PlayByPlayV3 JSON fixture.""" fixture_path = ( Path(__file__).parents[4] / "docs" / "nba_api" / "stat...
result
45f4fec38889f98ab0b5d68bcdd6d3230898c107
23
v2_extractor_at_anchor
swar/nba_api
45f4fec38889f98ab0b5d68bcdd6d3230898c107
23
train
train
tests/unit/stats/endpoints/test_scheduleleaguev2_parser.py
test_get_data_sets
assert
variable
38
import json import pytest from pathlib import Path from nba_api.stats.endpoints._parsers.scheduleleaguev2 import ( NBAStatsScheduleLeagueV2Parser, ) def json_fixture(): """Load the ScheduleLeagueV2 JSON fixture.""" fixture_path = ( Path(__file__).parents[4] / "docs" / "nba_api" ...
result
45f4fec38889f98ab0b5d68bcdd6d3230898c107
23
v2_extractor_at_anchor
swar/nba_api
45f4fec38889f98ab0b5d68bcdd6d3230898c107
23
train
train
tests/unit/stats/endpoints/test_boxscoreadvancedv3_parser.py
test_get_team_headers
assert
variable
39
import json from pathlib import Path import pytest from nba_api.stats.endpoints._parsers.boxscoreadvancedv3 import ( NBAStatsBoxscoreAdvancedV3Parser, ) from .data.boxscoreadvancedv3 import BOXSCOREADVANCEDV3_SAMPLE def parser(): """Create parser instance with minimal test fixture.""" return NBAStatsBox...
headers
45f4fec38889f98ab0b5d68bcdd6d3230898c107
23
v2_extractor_at_anchor
swar/nba_api
45f4fec38889f98ab0b5d68bcdd6d3230898c107
23
train
train
tests/unit/stats/endpoints/test_boxscoredefensivev2_parser.py
test_get_team_headers
assert
variable
39
import json from pathlib import Path import pytest from nba_api.stats.endpoints._parsers.boxscoredefensivev2 import ( NBAStatsBoxscoreDefensiveV2Parser, ) from .data.boxscoredefensivev2 import BOXSCOREDEFENSIVEV2_SAMPLE def parser(): """Create parser instance with minimal test fixture.""" return NBAStat...
headers
45f4fec38889f98ab0b5d68bcdd6d3230898c107
23
v2_extractor_at_anchor
swar/nba_api
45f4fec38889f98ab0b5d68bcdd6d3230898c107
23
train
train
tests/unit/stats/endpoints/test_boxscorefourfactorsv3_parser.py
test_get_team_headers
assert
variable
39
import json from pathlib import Path import pytest from nba_api.stats.endpoints._parsers.boxscorefourfactorsv3 import ( NBAStatsBoxscoreFourFactorsV3Parser, ) from .data.boxscorefourfactorsv3 import BOXSCOREFOURFACTORSV3_SAMPLE def parser(): """Create parser instance with minimal test fixture.""" return...
headers
45f4fec38889f98ab0b5d68bcdd6d3230898c107
23
v2_extractor_at_anchor
swar/nba_api
45f4fec38889f98ab0b5d68bcdd6d3230898c107
23
train
train
tests/unit/stats/endpoints/test_boxscorehustlev2_parser.py
test_get_team_headers
assert
variable
44
import json import pytest from pathlib import Path from nba_api.stats.endpoints._parsers.boxscorehustlev2 import ( NBAStatsBoxscoreHustleV2Parser, ) def json_fixture(): """Load the BoxScoreHustleV2 JSON fixture.""" fixture_path = ( Path(__file__).parents[4] / "docs" / "nba_api" ...
headers
45f4fec38889f98ab0b5d68bcdd6d3230898c107
23
v2_extractor_at_anchor
swar/nba_api
45f4fec38889f98ab0b5d68bcdd6d3230898c107
23
train
train
tests/unit/stats/endpoints/test_boxscorehustlev2_parser.py
test_get_team_data
assert
variable
47
import json import pytest from pathlib import Path from nba_api.stats.endpoints._parsers.boxscorehustlev2 import ( NBAStatsBoxscoreHustleV2Parser, ) def json_fixture(): """Load the BoxScoreHustleV2 JSON fixture.""" fixture_path = ( Path(__file__).parents[4] / "docs" / "nba_api" ...
game_id
45f4fec38889f98ab0b5d68bcdd6d3230898c107
23
v2_extractor_at_anchor
swar/nba_api
45f4fec38889f98ab0b5d68bcdd6d3230898c107
23
train
train
tests/unit/stats/endpoints/test_boxscorematchupsv3_parser.py
test_get_players_headers_structure
assert
variable
39
import json import pytest from pathlib import Path from nba_api.stats.endpoints._parsers.boxscorematchupsv3 import ( NBAStatsBoxscoreMatchupsParserV3, ) def json_fixture(): """Load the BoxScoreMatchupsV3 JSON fixture.""" fixture_path = ( Path(__file__).parents[4] / "docs" / "nba_ap...
headers
45f4fec38889f98ab0b5d68bcdd6d3230898c107
23
v2_extractor_at_anchor
swar/nba_api
45f4fec38889f98ab0b5d68bcdd6d3230898c107
23
train
train
tests/unit/stats/endpoints/test_boxscorematchupsv3_parser.py
test_game_id_in_all_rows
assert
variable
40
import json import pytest from pathlib import Path from nba_api.stats.endpoints._parsers.boxscorematchupsv3 import ( NBAStatsBoxscoreMatchupsParserV3, ) def json_fixture(): """Load the BoxScoreMatchupsV3 JSON fixture.""" fixture_path = ( Path(__file__).parents[4] / "docs" / "nba_ap...
game_id
45f4fec38889f98ab0b5d68bcdd6d3230898c107
23
v2_extractor_at_anchor
swar/nba_api
45f4fec38889f98ab0b5d68bcdd6d3230898c107
23
train
train
tests/unit/stats/endpoints/test_boxscoreplayertrackv3_parser.py
test_get_data_sets_structure
assert
variable
26
import pytest from nba_api.stats.endpoints._parsers.boxscoreplayertrackv3 import ( NBAStatsBoxscorePlayerTrackV3Parser, TEAM_METADATA_FIELDS, PLAYER_METADATA_FIELDS, PLAYERTRACK_STATS_FIELDS, ) from .data.boxscoreplayertrackv3 import BOXSCOREPLAYERTRACKV3_SAMPLE def json_fixture(): """Return the ...
dataset
45f4fec38889f98ab0b5d68bcdd6d3230898c107
23
v2_extractor_at_anchor
swar/nba_api
45f4fec38889f98ab0b5d68bcdd6d3230898c107
23
train
train
tests/unit/stats/endpoints/test_boxscorescoringv3_parser.py
test_get_team_headers
assert
variable
23
import pytest from nba_api.stats.endpoints._parsers.boxscorescoringv3 import ( NBAStatsBoxscoreScoringV3Parser, ) from .data.boxscorescoringv3 import BOXSCORESCORINGV3_SAMPLE def json_fixture(): """Return the BoxScoreScoringV3 sample fixture.""" return BOXSCORESCORINGV3_SAMPLE class TestBoxscoreScoringV...
headers
45f4fec38889f98ab0b5d68bcdd6d3230898c107
23
v2_extractor_at_anchor
swar/nba_api
45f4fec38889f98ab0b5d68bcdd6d3230898c107
23
train
train
tests/unit/stats/endpoints/test_iststandings_parser.py
test_get_iststandings_headers_structure
assert
variable
43
import json import pytest from pathlib import Path from nba_api.stats.endpoints._parsers.iststandings import ( NBAStatsISTStandingsParser, ) def json_fixture(): """Load the ISTStandings JSON fixture.""" fixture_path = ( Path(__file__).parents[4] / "docs" / "nba_api" / "stat...
headers
45f4fec38889f98ab0b5d68bcdd6d3230898c107
23
v2_extractor_at_anchor
swar/nba_api
45f4fec38889f98ab0b5d68bcdd6d3230898c107
23
train
train
tests/unit/stats/endpoints/test_playbyplayv3_parser.py
test_get_playbyplay_headers_structure
assert
variable
39
import json import pytest from pathlib import Path from nba_api.stats.endpoints._parsers.playbyplayv3 import ( NBAStatsPlayByPlayParserV3, ) def json_fixture(): """Load the PlayByPlayV3 JSON fixture.""" fixture_path = ( Path(__file__).parents[4] / "docs" / "nba_api" / "stat...
headers
45f4fec38889f98ab0b5d68bcdd6d3230898c107
23
v2_extractor_at_anchor
swar/nba_api
45f4fec38889f98ab0b5d68bcdd6d3230898c107
23
train
train
tests/unit/stats/endpoints/test_playbyplayv3_parser.py
test_get_playbyplay_data
assert
variable
47
import json import pytest from pathlib import Path from nba_api.stats.endpoints._parsers.playbyplayv3 import ( NBAStatsPlayByPlayParserV3, ) def json_fixture(): """Load the PlayByPlayV3 JSON fixture.""" fixture_path = ( Path(__file__).parents[4] / "docs" / "nba_api" / "stat...
game_id
45f4fec38889f98ab0b5d68bcdd6d3230898c107
23
v2_extractor_at_anchor
swar/nba_api
45f4fec38889f98ab0b5d68bcdd6d3230898c107
23
train
train
tests/unit/stats/endpoints/test_scheduleleaguev2.py
test_get_weeks_headers_2020
assert
variable
37
from unittest.mock import Mock, patch import pytest from nba_api.stats.endpoints import ScheduleLeagueV2 from nba_api.stats.endpoints._parsers import NBAStatsScheduleLeagueV2Parser from .data.scheduleleaguev2 import ( SCHEDULELEAGUEV2_2015_16, SCHEDULELEAGUEV2_2020_21, ) def json_fixture_2020(): """Get ...
headers
45f4fec38889f98ab0b5d68bcdd6d3230898c107
23
v2_extractor_at_anchor
swar/nba_api
45f4fec38889f98ab0b5d68bcdd6d3230898c107
23
train
train
tests/unit/stats/endpoints/test_scheduleleaguev2_parser.py
test_get_weeks_headers_structure
assert
variable
39
import json import pytest from pathlib import Path from nba_api.stats.endpoints._parsers.scheduleleaguev2 import ( NBAStatsScheduleLeagueV2Parser, ) def json_fixture(): """Load the ScheduleLeagueV2 JSON fixture.""" fixture_path = ( Path(__file__).parents[4] / "docs" / "nba_api" ...
headers
45f4fec38889f98ab0b5d68bcdd6d3230898c107
23
v2_extractor_at_anchor
swar/nba_api
45f4fec38889f98ab0b5d68bcdd6d3230898c107
23
train
train
tests/unit/test_live_boxscore.py
test_get_dict
assert
variable
486
import pytest import json from nba_api.library.http import NBAHTTP, NBAResponse from nba_api.live.nba.endpoints import boxscore from nba_api.live.nba.library.http import NBALiveHTTP content = { "meta": { "version": 1, "code": 200, "request": "http://nba.cloud/games/0022000180/boxscore?Forma...
content
45f4fec38889f98ab0b5d68bcdd6d3230898c107
23
v2_extractor_at_anchor
swar/nba_api
45f4fec38889f98ab0b5d68bcdd6d3230898c107
23
train
train
tests/unit/test_live_odds.py
test_get_dict
assert
variable
415
import pytest import json from nba_api.library.http import NBAHTTP, NBAResponse from nba_api.live.nba.endpoints import odds from nba_api.live.nba.library.http import NBALiveHTTP content = { "games": [ { "gameId": "0022400913", "sr_id": "sr:match:52632103", "srMatchId": "...
content
45f4fec38889f98ab0b5d68bcdd6d3230898c107
23
v2_extractor_at_anchor
swar/nba_api
45f4fec38889f98ab0b5d68bcdd6d3230898c107
23
train
train
tests/unit/test_live_playbyplay.py
test_get_actions_dict
assert
variable
116
import json import pytest from nba_api.library.http import NBAHTTP, NBAResponse from nba_api.live.nba.endpoints import playbyplay from nba_api.live.nba.library.http import NBALiveHTTP content = { "meta": { "version": 1, "code": 200, "request": "http://nba.cloud/games/0022000180/playbyplay?F...
actions
45f4fec38889f98ab0b5d68bcdd6d3230898c107
23
v2_extractor_at_anchor
swar/nba_api
45f4fec38889f98ab0b5d68bcdd6d3230898c107
23
train
train
tests/unit/test_live_playbyplay.py
test_get_dict
assert
variable
116
import json import pytest from nba_api.library.http import NBAHTTP, NBAResponse from nba_api.live.nba.endpoints import playbyplay from nba_api.live.nba.library.http import NBALiveHTTP content = { "meta": { "version": 1, "code": 200, "request": "http://nba.cloud/games/0022000180/playbyplay?F...
content
45f4fec38889f98ab0b5d68bcdd6d3230898c107
23
v2_extractor_at_anchor
swar/nba_api
45f4fec38889f98ab0b5d68bcdd6d3230898c107
23
train
train
tests/unit/test_live_scoreboard.py
test_get_dict
assert
variable
336
import json import pytest from nba_api.library.http import NBAHTTP, NBAResponse from nba_api.live.nba.endpoints import scoreboard from nba_api.live.nba.library.http import NBALiveHTTP content = { "meta": { "version": 1, "request": "https://nba-prod-us-east-1-mediaops-stats.s3.amazonaws.com/NBA/live...
content
45f4fec38889f98ab0b5d68bcdd6d3230898c107
23
v2_extractor_at_anchor
swar/nba_api
45f4fec38889f98ab0b5d68bcdd6d3230898c107
23
train
train
tests/unit/stats/endpoints/test_playbyplayv3_parser.py
test_get_videoavailable_data
assert
variable
40
import json import pytest from pathlib import Path from nba_api.stats.endpoints._parsers.playbyplayv3 import ( NBAStatsPlayByPlayParserV3, ) def json_fixture(): """Load the PlayByPlayV3 JSON fixture.""" fixture_path = ( Path(__file__).parents[4] / "docs" / "nba_api" / "stat...
expected
45f4fec38889f98ab0b5d68bcdd6d3230898c107
23
v2_extractor_at_anchor
swar/nba_api
45f4fec38889f98ab0b5d68bcdd6d3230898c107
23
train
train
tests/unit/stats/endpoints/test_iststandings_parser.py
test_get_iststandings_data
assert
variable
48
import json import pytest from pathlib import Path from nba_api.stats.endpoints._parsers.iststandings import ( NBAStatsISTStandingsParser, ) def json_fixture(): """Load the ISTStandings JSON fixture.""" fixture_path = ( Path(__file__).parents[4] / "docs" / "nba_api" / "stat...
league_id
45f4fec38889f98ab0b5d68bcdd6d3230898c107
23
v2_extractor_at_anchor
swar/nba_api
45f4fec38889f98ab0b5d68bcdd6d3230898c107
23
train
train
tests/unit/test_live_odds.py
test_initialization_with_proxy
assert
variable
417
import pytest import json from nba_api.library.http import NBAHTTP, NBAResponse from nba_api.live.nba.endpoints import odds from nba_api.live.nba.library.http import NBALiveHTTP content = { "games": [ { "gameId": "0022400913", "sr_id": "sr:match:52632103", "srMatchId": "...
proxy_url
45f4fec38889f98ab0b5d68bcdd6d3230898c107
23
v2_extractor_at_anchor
swar/nba_api
45f4fec38889f98ab0b5d68bcdd6d3230898c107
23
train
train
tests/unit/stats/endpoints/test_dunkscoreleaders.py
test_json_fixture_dunk_fields
assert
variable
21
from typing import Any, Dict from unittest.mock import Mock, patch import pytest from nba_api.stats.endpoints import DunkScoreLeaders from .data.dunkscoreleaders import DUNKSCORELEADERS_SAMPLE def json_fixture() -> Dict[str, Any]: """Load the DunkScoreLeaders fixture.""" return DUNKSCORELEADERS_SAMPLE class...
first_dunk
45f4fec38889f98ab0b5d68bcdd6d3230898c107
23
v2_extractor_at_anchor
swar/nba_api
45f4fec38889f98ab0b5d68bcdd6d3230898c107
23
train
train
tests/unit/stats/endpoints/test_iststandings_parser.py
test_get_iststandings_data
assert
variable
49
import json import pytest from pathlib import Path from nba_api.stats.endpoints._parsers.iststandings import ( NBAStatsISTStandingsParser, ) def json_fixture(): """Load the ISTStandings JSON fixture.""" fixture_path = ( Path(__file__).parents[4] / "docs" / "nba_api" / "stat...
season_year
45f4fec38889f98ab0b5d68bcdd6d3230898c107
23
v2_extractor_at_anchor
swar/nba_api
45f4fec38889f98ab0b5d68bcdd6d3230898c107
23
train
train
tests/unit/stats/endpoints/test_iststandings_parser.py
test_data_row_count_matches_teams
assert
variable
39
import json import pytest from pathlib import Path from nba_api.stats.endpoints._parsers.iststandings import ( NBAStatsISTStandingsParser, ) def json_fixture(): """Load the ISTStandings JSON fixture.""" fixture_path = ( Path(__file__).parents[4] / "docs" / "nba_api" / "stat...
teams_count
45f4fec38889f98ab0b5d68bcdd6d3230898c107
23
v2_extractor_at_anchor
swar/nba_api
45f4fec38889f98ab0b5d68bcdd6d3230898c107
23
train
train
tests/unit/stats/endpoints/test_teamdashlineups.py
test_json_fixture_result_sets
assert
variable
30
from typing import Any, Dict from unittest.mock import Mock, patch import pytest from nba_api.stats.endpoints import TeamDashLineups from .data.teamdashlineups import TEAMDASHLINEUPS_SAMPLE def json_fixture() -> Dict[str, Any]: """Load the TeamDashLineups fixture.""" return TEAMDASHLINEUPS_SAMPLE class Test...
lineups_set
45f4fec38889f98ab0b5d68bcdd6d3230898c107
23
v2_extractor_at_anchor
swar/nba_api
45f4fec38889f98ab0b5d68bcdd6d3230898c107
23
train
train
tests/unit/test_http.py
test_endpoint_uses_global_session
assert
variable
34
import pytest import requests from unittest.mock import Mock from nba_api.library.http import NBAHTTP from nba_api.stats.endpoints import AllTimeLeadersGrids def mock_session(): session = Mock(spec=requests.Session) # Mock the get method to return a response-like object mock_response = Mock() mock_resp...
call_kwargs
45f4fec38889f98ab0b5d68bcdd6d3230898c107
23
v2_extractor_at_anchor
swar/nba_api
45f4fec38889f98ab0b5d68bcdd6d3230898c107
23
train
train
tests/unit/stats/endpoints/test_boxscorematchupsv3_parser.py
test_parser_initialization
assert
variable
36
import json import pytest from pathlib import Path from nba_api.stats.endpoints._parsers.boxscorematchupsv3 import ( NBAStatsBoxscoreMatchupsParserV3, ) def json_fixture(): """Load the BoxScoreMatchupsV3 JSON fixture.""" fixture_path = ( Path(__file__).parents[4] / "docs" / "nba_ap...
json_fixture
45f4fec38889f98ab0b5d68bcdd6d3230898c107
23
v2_extractor_at_anchor
swar/nba_api
45f4fec38889f98ab0b5d68bcdd6d3230898c107
23
train
train
tests/unit/stats/endpoints/test_playbyplayv3_parser.py
test_parser_initialization
assert
variable
36
import json import pytest from pathlib import Path from nba_api.stats.endpoints._parsers.playbyplayv3 import ( NBAStatsPlayByPlayParserV3, ) def json_fixture(): """Load the PlayByPlayV3 JSON fixture.""" fixture_path = ( Path(__file__).parents[4] / "docs" / "nba_api" / "stat...
json_fixture
45f4fec38889f98ab0b5d68bcdd6d3230898c107
23
v2_extractor_at_anchor
swar/nba_api
45f4fec38889f98ab0b5d68bcdd6d3230898c107
23
train
train
tests/unit/test_live_boxscore.py
test_game_details_dict
assert
variable
486
import pytest import json from nba_api.library.http import NBAHTTP, NBAResponse from nba_api.live.nba.endpoints import boxscore from nba_api.live.nba.library.http import NBALiveHTTP content = { "meta": { "version": 1, "code": 200, "request": "http://nba.cloud/games/0022000180/boxscore?Forma...
game_details
45f4fec38889f98ab0b5d68bcdd6d3230898c107
23
v2_extractor_at_anchor
swar/nba_api
45f4fec38889f98ab0b5d68bcdd6d3230898c107
23
train
train
tests/unit/stats/endpoints/test_playbyplayv3_parser.py
test_data_row_count_matches_actions
assert
variable
39
import json import pytest from pathlib import Path from nba_api.stats.endpoints._parsers.playbyplayv3 import ( NBAStatsPlayByPlayParserV3, ) def json_fixture(): """Load the PlayByPlayV3 JSON fixture.""" fixture_path = ( Path(__file__).parents[4] / "docs" / "nba_api" / "stat...
actions_count
45f4fec38889f98ab0b5d68bcdd6d3230898c107
23
v2_extractor_at_anchor
swar/nba_api
45f4fec38889f98ab0b5d68bcdd6d3230898c107
23
train
train
tests/unit/test_playbyplayregex.py
test_foul_player
assert
complex_expr
28
import pytest from nba_api.stats.library.playbyplayregex import * from data_playbyplayregex import playbyplay @pytest.mark.parametrize("play", playbyplay["FoulPlayer"]) def test_foul_player(play): # Validate Pattern assert re_foul_player.match(play["description"]) # Get Capture Groups search_result = ...
play["team"]
45f4fec38889f98ab0b5d68bcdd6d3230898c107
23
v2_extractor_at_anchor
swar/nba_api
45f4fec38889f98ab0b5d68bcdd6d3230898c107
23
train
train
tests/unit/test_playbyplayregex.py
test_timeout
assert
complex_expr
24
import pytest from nba_api.stats.library.playbyplayregex import * from data_playbyplayregex import playbyplay @pytest.mark.parametrize("play", playbyplay["Timeout"]) def test_timeout(play): # Validate Pattern assert re_timeout.match(play["description"]) # Get Capture Groups search_result = re_timeout....
play["full"]
45f4fec38889f98ab0b5d68bcdd6d3230898c107
23
v2_extractor_at_anchor
swar/nba_api
45f4fec38889f98ab0b5d68bcdd6d3230898c107
23
train
train
tests/unit/test_playbyplayregex.py
test_timeout
assert
complex_expr
28
import pytest from nba_api.stats.library.playbyplayregex import * from data_playbyplayregex import playbyplay @pytest.mark.parametrize("play", playbyplay["Timeout"]) def test_timeout(play): # Validate Pattern assert re_timeout.match(play["description"]) # Get Capture Groups search_result = re_timeout....
play["short"]
45f4fec38889f98ab0b5d68bcdd6d3230898c107
23
v2_extractor_at_anchor
swar/nba_api
45f4fec38889f98ab0b5d68bcdd6d3230898c107
23
train
train
tests/unit/test_playbyplayregex.py
test_block_player
assert
complex_expr
16
import pytest from nba_api.stats.library.playbyplayregex import * from data_playbyplayregex import playbyplay @pytest.mark.parametrize("play", playbyplay["Block"]) def test_block_player(play): # Validate Pattern assert re_block.match(play["description"]) # Get Capture Groups search_result = re_block...
play["player"]
45f4fec38889f98ab0b5d68bcdd6d3230898c107
23
v2_extractor_at_anchor
swar/nba_api
45f4fec38889f98ab0b5d68bcdd6d3230898c107
23
train
train
tests/unit/test_playbyplayregex.py
test_block_player
assert
complex_expr
20
import pytest from nba_api.stats.library.playbyplayregex import * from data_playbyplayregex import playbyplay @pytest.mark.parametrize("play", playbyplay["Block"]) def test_block_player(play): # Validate Pattern assert re_block.match(play["description"]) # Get Capture Groups search_result = re_block...
play["blocks"]
45f4fec38889f98ab0b5d68bcdd6d3230898c107
23
v2_extractor_at_anchor
swar/nba_api
45f4fec38889f98ab0b5d68bcdd6d3230898c107
23
train
train
tests/unit/test_playbyplayregex.py
test_field_goal_made
assert
complex_expr
28
import pytest from nba_api.stats.library.playbyplayregex import * from data_playbyplayregex import playbyplay @pytest.mark.parametrize("play", playbyplay["FieldGoalMade"]) def test_field_goal_made(play): # Validate Pattern assert re_field_goal_made.match(play["description"]) # Get Capture Groups searc...
play["points"]
45f4fec38889f98ab0b5d68bcdd6d3230898c107
23
v2_extractor_at_anchor
swar/nba_api
45f4fec38889f98ab0b5d68bcdd6d3230898c107
23
train
train
tests/unit/test_live_boxscore.py
test_game_dict
assert
complex_expr
486
import pytest import json from nba_api.library.http import NBAHTTP, NBAResponse from nba_api.live.nba.endpoints import boxscore from nba_api.live.nba.library.http import NBALiveHTTP content = { "meta": { "version": 1, "code": 200, "request": "http://nba.cloud/games/0022000180/boxscore?Forma...
content["game"]
45f4fec38889f98ab0b5d68bcdd6d3230898c107
23
v2_extractor_at_anchor
swar/nba_api
45f4fec38889f98ab0b5d68bcdd6d3230898c107
23
train
train
tests/unit/test_live_odds.py
test_games_dict
assert
complex_expr
415
import pytest import json from nba_api.library.http import NBAHTTP, NBAResponse from nba_api.live.nba.endpoints import odds from nba_api.live.nba.library.http import NBALiveHTTP content = { "games": [ { "gameId": "0022400913", "sr_id": "sr:match:52632103", "srMatchId": "...
content["games"]
45f4fec38889f98ab0b5d68bcdd6d3230898c107
23
v2_extractor_at_anchor
swar/nba_api
45f4fec38889f98ab0b5d68bcdd6d3230898c107
23
train
train
tests/unit/stats/endpoints/test_boxscorematchupsv3_parser.py
test_get_data_sets
assert
complex_expr
39
import json import pytest from pathlib import Path from nba_api.stats.endpoints._parsers.boxscorematchupsv3 import ( NBAStatsBoxscoreMatchupsParserV3, ) def json_fixture(): """Load the BoxScoreMatchupsV3 JSON fixture.""" fixture_path = ( Path(__file__).parents[4] / "docs" / "nba_ap...
result["PlayerStats"]
45f4fec38889f98ab0b5d68bcdd6d3230898c107
23
v2_extractor_at_anchor
swar/nba_api
45f4fec38889f98ab0b5d68bcdd6d3230898c107
23
train
train
tests/unit/test_live_boxscore.py
test_arena_dict
assert
complex_expr
486
import pytest import json from nba_api.library.http import NBAHTTP, NBAResponse from nba_api.live.nba.endpoints import boxscore from nba_api.live.nba.library.http import NBALiveHTTP content = { "meta": { "version": 1, "code": 200, "request": "http://nba.cloud/games/0022000180/boxscore?Forma...
content["game"]["arena"]
45f4fec38889f98ab0b5d68bcdd6d3230898c107
23
v2_extractor_at_anchor
swar/nba_api
45f4fec38889f98ab0b5d68bcdd6d3230898c107
23
train
train
tests/unit/test_stats_library_nbastatsresponse.py
test_get_data_sets
assert
complex_expr
600
0.125, 0, 0.333, 0, 0, 0.5, 0.375, 0.147, ], ], }, "TeamStats": { ...
response["exp_data_sets"]
45f4fec38889f98ab0b5d68bcdd6d3230898c107
23
v2_extractor_at_anchor
swar/nba_api
45f4fec38889f98ab0b5d68bcdd6d3230898c107
23
train
train
tests/unit/test_stats_library_nbastatsresponse.py
test_get_parameters
assert
complex_expr
600
0.125, 0, 0.333, 0, 0, 0.5, 0.375, 0.147, ], ], }, "TeamStats": { ...
response["exp_parameters"]
45f4fec38889f98ab0b5d68bcdd6d3230898c107
23
v2_extractor_at_anchor
swar/nba_api
45f4fec38889f98ab0b5d68bcdd6d3230898c107
23
train
train
tests/unit/test_live_boxscore.py
test_home_team_dict
assert
complex_expr
486
import pytest import json from nba_api.library.http import NBAHTTP, NBAResponse from nba_api.live.nba.endpoints import boxscore from nba_api.live.nba.library.http import NBALiveHTTP content = { "meta": { "version": 1, "code": 200, "request": "http://nba.cloud/games/0022000180/boxscore?Forma...
content["game"]["homeTeam"]
45f4fec38889f98ab0b5d68bcdd6d3230898c107
23
v2_extractor_at_anchor
swar/nba_api
45f4fec38889f98ab0b5d68bcdd6d3230898c107
23
train
train
tests/unit/test_live_boxscore.py
test_away_team_dict
assert
complex_expr
486
import pytest import json from nba_api.library.http import NBAHTTP, NBAResponse from nba_api.live.nba.endpoints import boxscore from nba_api.live.nba.library.http import NBALiveHTTP content = { "meta": { "version": 1, "code": 200, "request": "http://nba.cloud/games/0022000180/boxscore?Forma...
content["game"]["awayTeam"]
45f4fec38889f98ab0b5d68bcdd6d3230898c107
23
v2_extractor_at_anchor
swar/nba_api
45f4fec38889f98ab0b5d68bcdd6d3230898c107
23
train
train
tests/unit/test_live_boxscore.py
test_officials_dict
assert
complex_expr
486
import pytest import json from nba_api.library.http import NBAHTTP, NBAResponse from nba_api.live.nba.endpoints import boxscore from nba_api.live.nba.library.http import NBALiveHTTP content = { "meta": { "version": 1, "code": 200, "request": "http://nba.cloud/games/0022000180/boxscore?Forma...
content["game"]["officials"]
45f4fec38889f98ab0b5d68bcdd6d3230898c107
23
v2_extractor_at_anchor
swar/nba_api
45f4fec38889f98ab0b5d68bcdd6d3230898c107
23
train
train
tests/unit/test_live_odds.py
test_first_game_markets
assert
complex_expr
416
import pytest import json from nba_api.library.http import NBAHTTP, NBAResponse from nba_api.live.nba.endpoints import odds from nba_api.live.nba.library.http import NBALiveHTTP content = { "games": [ { "gameId": "0022400913", "sr_id": "sr:match:52632103", "srMatchId": "...
content["games"][0]["markets"]
45f4fec38889f98ab0b5d68bcdd6d3230898c107
23
v2_extractor_at_anchor
swar/nba_api
45f4fec38889f98ab0b5d68bcdd6d3230898c107
23
train
train
tests/unit/test_stats_library_nbastatsresponse.py
test_get_normalized_dict
assert
complex_expr
600
0.125, 0, 0.333, 0, 0, 0.5, 0.375, 0.147, ], ], }, "TeamStats": { ...
response["exp_normalized_dict"]
45f4fec38889f98ab0b5d68bcdd6d3230898c107
23
v2_extractor_at_anchor
swar/nba_api
45f4fec38889f98ab0b5d68bcdd6d3230898c107
23
train
train
tests/unit/test_stats_library_nbastatsresponse.py
test_get_normalized_json
assert
complex_expr
600
0.125, 0, 0.333, 0, 0, 0.5, 0.375, 0.147, ], ], }, "TeamStats": { ...
response["exp_normalized_json"]
45f4fec38889f98ab0b5d68bcdd6d3230898c107
23
v2_extractor_at_anchor
swar/nba_api
45f4fec38889f98ab0b5d68bcdd6d3230898c107
23
train
train
tests/unit/stats/endpoints/test_boxscorematchupsv3_parser.py
test_parser_handles_nested_matchups
assert
complex_expr
38
import json import pytest from pathlib import Path from nba_api.stats.endpoints._parsers.boxscorematchupsv3 import ( NBAStatsBoxscoreMatchupsParserV3, ) def json_fixture(): """Load the BoxScoreMatchupsV3 JSON fixture.""" fixture_path = ( Path(__file__).parents[4] / "docs" / "nba_ap...
json_fixture["boxScoreMatchups"]
45f4fec38889f98ab0b5d68bcdd6d3230898c107
23
v2_extractor_at_anchor
swar/nba_api
45f4fec38889f98ab0b5d68bcdd6d3230898c107
23
train
train
tests/unit/test_live_boxscore.py
test_home_team_player_stats
assert
complex_expr
486
import pytest import json from nba_api.library.http import NBAHTTP, NBAResponse from nba_api.live.nba.endpoints import boxscore from nba_api.live.nba.library.http import NBALiveHTTP content = { "meta": { "version": 1, "code": 200, "request": "http://nba.cloud/games/0022000180/boxscore?Forma...
content["game"]["homeTeam"]["players"]
45f4fec38889f98ab0b5d68bcdd6d3230898c107
23
v2_extractor_at_anchor
swar/nba_api
45f4fec38889f98ab0b5d68bcdd6d3230898c107
23
train
train
tests/unit/stats/endpoints/test_boxscoreplayertrackv3_parser.py
test_parser_initialization_with_missing_root_key
assert
collection
25
import pytest from nba_api.stats.endpoints._parsers.boxscoreplayertrackv3 import ( NBAStatsBoxscorePlayerTrackV3Parser, TEAM_METADATA_FIELDS, PLAYER_METADATA_FIELDS, PLAYERTRACK_STATS_FIELDS, ) from .data.boxscoreplayertrackv3 import BOXSCOREPLAYERTRACKV3_SAMPLE def json_fixture(): """Return the ...
{}
45f4fec38889f98ab0b5d68bcdd6d3230898c107
23
v2_extractor_at_anchor
swar/nba_api
45f4fec38889f98ab0b5d68bcdd6d3230898c107
23
train
train
tests/unit/stats/endpoints/test_boxscoreusagev3_parser.py
test_parser_initialization_with_missing_boxscore
assert
collection
25
import pytest from nba_api.stats.endpoints._parsers.boxscoreusagev3 import ( NBAStatsBoxscoreUsageV3Parser, ) from .data.boxscoreusagev3 import BOXSCOREUSAGEV3_SAMPLE def parser(): """Create parser instance with minimal test fixture.""" return NBAStatsBoxscoreUsageV3Parser(BOXSCOREUSAGEV3_SAMPLE) def js...
{}
45f4fec38889f98ab0b5d68bcdd6d3230898c107
23
v2_extractor_at_anchor
swar/nba_api
45f4fec38889f98ab0b5d68bcdd6d3230898c107
23
train
train
tests/unit/stats/endpoints/test_scheduleleaguev2.py
test_get_data_sets_2015
assert
collection
44
from unittest.mock import Mock, patch import pytest from nba_api.stats.endpoints import ScheduleLeagueV2 from nba_api.stats.endpoints._parsers import NBAStatsScheduleLeagueV2Parser from .data.scheduleleaguev2 import ( SCHEDULELEAGUEV2_2015_16, SCHEDULELEAGUEV2_2020_21, ) def json_fixture_2020(): """Get ...
[]
45f4fec38889f98ab0b5d68bcdd6d3230898c107
23
v2_extractor_at_anchor
swar/nba_api
45f4fec38889f98ab0b5d68bcdd6d3230898c107
23
train
train
tests/unit/stats/endpoints/test_scoreboardv3_parser.py
test_handles_missing_fields
assert
collection
34
import pytest from nba_api.stats.endpoints._parsers.scoreboardv3 import ( NBAStatsScoreboardV3Parser, ) from .data.scoreboardv3 import SCOREBOARDV3_SAMPLE def parser(): """Create parser instance with minimal test fixture.""" return NBAStatsScoreboardV3Parser(SCOREBOARDV3_SAMPLE) def json_fixture(): ...
[]
45f4fec38889f98ab0b5d68bcdd6d3230898c107
23
v2_extractor_at_anchor
syrupy-project/syrupy
8f581d577068f19a9e0fff65f4476f4601c137df
91
train
train
src/syrupy/assertion.py
assert_match
assert
variable
140
import traceback from collections import namedtuple from dataclasses import ( dataclass, field, ) from gettext import gettext from typing import ( TYPE_CHECKING, Any, Callable, Dict, List, Optional, Tuple, Type, ) from .exceptions import ( SnapshotDoesNotExist, TaintedSn...
data
8f581d577068f19a9e0fff65f4476f4601c137df
91
v2_extractor_at_anchor
syrupy-project/syrupy
8f581d577068f19a9e0fff65f4476f4601c137df
91
train
train
tests/examples/test_custom_image_extension.py
test_jpeg_image
assert
variable
28
import base64 import pytest from syrupy.extensions.single_file import SingleFileSnapshotExtension def snapshot(snapshot): return snapshot.use_extension(JPEGImageExtension) def test_jpeg_image(snapshot): reddish_square = base64.b64decode( b"/9j/4AAQSkZJRgABAQEASABIAAD/2wBDAP//////////////////////////...
snapshot
8f581d577068f19a9e0fff65f4476f4601c137df
91
v2_extractor_at_anchor
syrupy-project/syrupy
8f581d577068f19a9e0fff65f4476f4601c137df
91
train
train
tests/examples/test_custom_image_name_suffix.py
test_png_image_with_custom_name_suffix
assert
func_call
22
import base64 import pytest from syrupy.extensions.image import PNGImageSnapshotExtension def snapshot(snapshot): return snapshot.use_extension(PNGImageSnapshotExtension) def test_png_image_with_custom_name_suffix(snapshot): reddish_square = base64.b64decode( b"iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAIAAA...
snapshot(name="blueish")
8f581d577068f19a9e0fff65f4476f4601c137df
91
v2_extractor_at_anchor
syrupy-project/syrupy
8f581d577068f19a9e0fff65f4476f4601c137df
91
train
train
tests/examples/test_custom_image_name_suffix.py
test_png_image_with_custom_name_suffix
assert
func_call
23
import base64 import pytest from syrupy.extensions.image import PNGImageSnapshotExtension def snapshot(snapshot): return snapshot.use_extension(PNGImageSnapshotExtension) def test_png_image_with_custom_name_suffix(snapshot): reddish_square = base64.b64decode( b"iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAIAAA...
snapshot(name="reddish")
8f581d577068f19a9e0fff65f4476f4601c137df
91
v2_extractor_at_anchor
syrupy-project/syrupy
8f581d577068f19a9e0fff65f4476f4601c137df
91
train
train
tests/examples/test_custom_object_repr.py
test_snapshot_custom_class
assert
variable
3
def test_snapshot_custom_class(snapshot): assert MyCustomClass() ==
snapshot
8f581d577068f19a9e0fff65f4476f4601c137df
91
v2_extractor_at_anchor
syrupy-project/syrupy
8f581d577068f19a9e0fff65f4476f4601c137df
91
train
train
tests/examples/test_custom_snapshot_directory.py
test_case_1
assert
variable
15
from pathlib import Path import pytest from syrupy.extensions.amber import AmberSnapshotExtension from syrupy.location import PyTestLocation DIFFERENT_DIRECTORY = "__snaps_example__" def snapshot(snapshot): return snapshot.use_extension(DifferentDirectoryExtension) def test_case_1(snapshot): assert "Syrup...
snapshot
8f581d577068f19a9e0fff65f4476f4601c137df
91
v2_extractor_at_anchor
syrupy-project/syrupy
8f581d577068f19a9e0fff65f4476f4601c137df
91
train
train
tests/examples/test_custom_snapshot_directory_2.py
test_case_v1
assert
variable
28
from pathlib import Path import pytest from syrupy.extensions.json import JSONSnapshotExtension from syrupy.location import PyTestLocation def create_versioned_fixture(version: int): class VersionedJSONExtension(JSONSnapshotExtension): @classmethod def dirname(cls, *, test_location: "PyTestLocati...
snapshot_v1
8f581d577068f19a9e0fff65f4476f4601c137df
91
v2_extractor_at_anchor
syrupy-project/syrupy
8f581d577068f19a9e0fff65f4476f4601c137df
91
train
train
tests/examples/test_custom_snapshot_directory_2.py
test_case_v2
assert
variable
28
from pathlib import Path import pytest from syrupy.extensions.json import JSONSnapshotExtension from syrupy.location import PyTestLocation def create_versioned_fixture(version: int): class VersionedJSONExtension(JSONSnapshotExtension): @classmethod def dirname(cls, *, test_location: "PyTestLocati...
snapshot_v2
8f581d577068f19a9e0fff65f4476f4601c137df
91
v2_extractor_at_anchor
syrupy-project/syrupy
8f581d577068f19a9e0fff65f4476f4601c137df
91
train
train
tests/examples/test_custom_snapshot_name.py
test_canadian_name
assert
variable
12
import pytest from syrupy.extensions.amber import AmberSnapshotExtension from syrupy.location import PyTestLocation from syrupy.types import SnapshotIndex def snapshot(snapshot): return snapshot.use_extension(CanadianNameExtension) def test_canadian_name(snapshot): assert "Name should be test_canadian_name�...
snapshot
8f581d577068f19a9e0fff65f4476f4601c137df
91
v2_extractor_at_anchor
syrupy-project/syrupy
8f581d577068f19a9e0fff65f4476f4601c137df
91
train
train
tests/examples/test_custom_snapshot_name_suffix.py
test_snapshot_custom_snapshot_name_suffix
assert
func_call
3
def test_snapshot_custom_snapshot_name_suffix(snapshot): assert "Syrupy is amazing!" ==
snapshot(name="test_is_amazing")
8f581d577068f19a9e0fff65f4476f4601c137df
91
v2_extractor_at_anchor
syrupy-project/syrupy
8f581d577068f19a9e0fff65f4476f4601c137df
91
train
train
tests/examples/test_custom_snapshot_name_suffix.py
test_snapshot_custom_snapshot_name_suffix
assert
func_call
4
def test_snapshot_custom_snapshot_name_suffix(snapshot): assert "Syrupy is amazing!" == snapshot(name="test_is_amazing") assert "Syrupy is awesome!" ==
snapshot(name="test_is_awesome")
8f581d577068f19a9e0fff65f4476f4601c137df
91
v2_extractor_at_anchor
syrupy-project/syrupy
8f581d577068f19a9e0fff65f4476f4601c137df
91
train
train
tests/integration/test_custom_comparator.py
test_generated_snapshots
assert
numeric_literal
52
import pytest def testcases_initial(testdir): testdir.makeconftest( """ import pytest import math from syrupy.extensions.amber import AmberSnapshotExtension class CustomSnapshotExtension(AmberSnapshotExtension): def matches(self, *, serialized_data, snapshot_da...
0
8f581d577068f19a9e0fff65f4476f4601c137df
91
v2_extractor_at_anchor
syrupy-project/syrupy
8f581d577068f19a9e0fff65f4476f4601c137df
91
train
train
tests/integration/test_custom_comparator.py
test_failed_snapshots
assert
numeric_literal
53
import pytest def testcases_initial(testdir): testdir.makeconftest( """ import pytest import math from syrupy.extensions.amber import AmberSnapshotExtension class CustomSnapshotExtension(AmberSnapshotExtension): def matches(self, *, serialized_data, snapshot_da...
1
8f581d577068f19a9e0fff65f4476f4601c137df
91
v2_extractor_at_anchor
syrupy-project/syrupy
8f581d577068f19a9e0fff65f4476f4601c137df
91
train
train
tests/integration/test_custom_comparator.py
test_generated_snapshots
assert
func_call
51
import pytest def testcases_initial(testdir): testdir.makeconftest( """ import pytest import math from syrupy.extensions.amber import AmberSnapshotExtension class CustomSnapshotExtension(AmberSnapshotExtension): def matches(self, *, serialized_data, snapshot_da...
result.stdout.str()
8f581d577068f19a9e0fff65f4476f4601c137df
91
v2_extractor_at_anchor
syrupy-project/syrupy
8f581d577068f19a9e0fff65f4476f4601c137df
91
train
train
tests/integration/test_pytest_extension.py
test_ignores_non_function_nodes
assert
numeric_literal
25
def test_ignores_non_function_nodes(testdir): conftest = """ import pytest class CustomItem(pytest.Item, pytest.File): def __init__(self, *args, fspath, parent, **kwargs): super().__init__(fspath, parent=parent) self._nodeid += "::CUSTOM" def...
0
8f581d577068f19a9e0fff65f4476f4601c137df
91
v2_extractor_at_anchor
syrupy-project/syrupy
8f581d577068f19a9e0fff65f4476f4601c137df
91
train
train
tests/integration/test_pytest_extension.py
test_does_not_print_empty_snapshot_report
assert
func_call
18
def test_does_not_print_empty_snapshot_report(testdir): testdir.makeconftest("") testcase_no_snapshots = """ def test_example(snapshot): assert 1 """ testcase_yes_snapshots = """ def test_example(snapshot): assert snapshot == 1 """ testdir.makepyfi...
result.stdout.str()
8f581d577068f19a9e0fff65f4476f4601c137df
91
v2_extractor_at_anchor
syrupy-project/syrupy
8f581d577068f19a9e0fff65f4476f4601c137df
91
train
train
tests/integration/test_single_file_multiple_extensions.py
test_multiple_file_extensions
assert
numeric_literal
27
from pathlib import Path def test_multiple_file_extensions(testdir): file_extension = "ext2.ext1" testcase = f""" import pytest from syrupy.extensions.single_file import SingleFileSnapshotExtension class DotInFileExtension(SingleFileSnapshotExtension): _file_extension = "{file_extension}"...
0
8f581d577068f19a9e0fff65f4476f4601c137df
91
v2_extractor_at_anchor
syrupy-project/syrupy
8f581d577068f19a9e0fff65f4476f4601c137df
91
train
train
tests/integration/test_single_file_multiple_extensions.py
test_multiple_file_extensions
assert
func_call
26
from pathlib import Path def test_multiple_file_extensions(testdir): file_extension = "ext2.ext1" testcase = f""" import pytest from syrupy.extensions.single_file import SingleFileSnapshotExtension class DotInFileExtension(SingleFileSnapshotExtension): _file_extension = "{file_extension}"...
result.stdout.str()
8f581d577068f19a9e0fff65f4476f4601c137df
91
v2_extractor_at_anchor
syrupy-project/syrupy
8f581d577068f19a9e0fff65f4476f4601c137df
91
train
train
tests/integration/test_snapshot_option_defaults.py
test_injected_fixture
assert
numeric_literal
21
import pytest def testcases(): return { "inject": ( """ def test_injection(snapshot): assert snapshot is not None """ ), } def run_testcases(testdir, testcases): pyfile_content = "\n\n".join(testcases.values()) testdir.makepyfile(test...
0
8f581d577068f19a9e0fff65f4476f4601c137df
91
v2_extractor_at_anchor
syrupy-project/syrupy
8f581d577068f19a9e0fff65f4476f4601c137df
91
train
train
tests/integration/test_snapshot_option_include_details.py
test_unused_snapshots_details_multiple_tests
assert
numeric_literal
70
import pytest def testcases(): return { "used": ( """ def test_used(snapshot): assert snapshot == 'used' """ ), "unused": ( """ def test_unused(snapshot): assert snapshot == 'unused' """ ...
1
8f581d577068f19a9e0fff65f4476f4601c137df
91
v2_extractor_at_anchor
syrupy-project/syrupy
8f581d577068f19a9e0fff65f4476f4601c137df
91
train
train
tests/integration/test_snapshot_option_include_details.py
test_unused_snapshots_details_no_details_on_deletion
assert
numeric_literal
63
import pytest def testcases(): return { "used": ( """ def test_used(snapshot): assert snapshot == 'used' """ ), "unused": ( """ def test_unused(snapshot): assert snapshot == 'unused' """ ...
0
8f581d577068f19a9e0fff65f4476f4601c137df
91
v2_extractor_at_anchor
syrupy-project/syrupy
8f581d577068f19a9e0fff65f4476f4601c137df
91
train
train
tests/integration/test_snapshot_option_include_details.py
test_unused_snapshots_details
assert
variable
74
import pytest def testcases(): return { "used": ( """ def test_used(snapshot): assert snapshot == 'used' """ ), "unused": ( """ def test_unused(snapshot): assert snapshot == 'unused' """ ...
expected_status_code
8f581d577068f19a9e0fff65f4476f4601c137df
91
v2_extractor_at_anchor