예제 #1
0
    def test_standings(self, season: Optional[int]) -> None:
        standings_list = standings(season)

        assert standings_list is not None
        assert len(standings_list) == get_division_counts_by_season(season)

        for data in standings_list:
            assert data is not None
            assert not data.empty
            assert len(data.columns) > 0
            assert len(data.index) > 0
예제 #2
0
    def test_standings_future(self) -> None:
        season = datetime.today().year + 1

        standings_list = standings(season)

        assert standings_list == []
예제 #3
0
    def test_standings_pre_1871(self) -> None:
        season = 1870

        with pytest.raises(ValueError):
            standings(season)
예제 #4
0
    def test_standings_future(self) -> None:
        season = most_recent_season() + 1

        standings_list = standings(season)

        assert standings_list == []