Esempio n. 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
Esempio n. 2
0
    def test_standings_future(self) -> None:
        season = datetime.today().year + 1

        standings_list = standings(season)

        assert standings_list == []
Esempio n. 3
0
    def test_standings_pre_1871(self) -> None:
        season = 1870

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

        standings_list = standings(season)

        assert standings_list == []