Skip to content

Commit

Permalink
TST: fix more doctest failures
Browse files Browse the repository at this point in the history
  • Loading branch information
theOehrly committed Jan 13, 2025
1 parent 14c0b58 commit f2f26fd
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions docs/ergast.rst
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ as 'raw':

>>> ergast.get_circuits(season=2022, result_type='raw') # doctest: +NORMALIZE_WHITESPACE
[{'circuitId': 'albert_park',
'url': 'https://en.wikipedia.org/wiki/Melbourne_Grand_Prix_Circuit',
'url': 'https://en.wikipedia.org/wiki/Albert_Park_Circuit',
'circuitName': 'Albert Park Grand Prix Circuit',
'Location': {'lat': -37.8497,
'long': 144.968,
Expand Down Expand Up @@ -266,9 +266,9 @@ responds with:
>>> seasons = ergast.get_seasons(limit=3)
>>> seasons
season seasonUrl
0 1950 https://en.wikipedia.org/wiki/1950_Formula_One_...
1 1951 https://en.wikipedia.org/wiki/1951_Formula_One_...
2 1952 https://en.wikipedia.org/wiki/1952_Formula_One_...
0 1950 https://en.wikipedia.org/wiki/1950_Formula_One...
1 1951 https://en.wikipedia.org/wiki/1951_Formula_One...
2 1952 https://en.wikipedia.org/wiki/1952_Formula_One...

It is possible to check whether a response contains all results and to obtain
the total number of results:
Expand All @@ -287,19 +287,19 @@ same limit as before is used.

>>> seasons.get_next_result_page()
season seasonUrl
0 1953 https://en.wikipedia.org/wiki/1953_Formula_One_...
1 1954 https://en.wikipedia.org/wiki/1954_Formula_One_...
2 1955 https://en.wikipedia.org/wiki/1955_Formula_One_...
0 1953 https://en.wikipedia.org/wiki/1953_Formula_One...
1 1954 https://en.wikipedia.org/wiki/1954_Formula_One...
2 1955 https://en.wikipedia.org/wiki/1955_Formula_One...

It is also possible to manually specify an offset into the dataset:

.. doctest::

>>> ergast.get_seasons(limit=3, offset=6)
season seasonUrl
0 1956 https://en.wikipedia.org/wiki/1956_Formula_One_...
1 1957 https://en.wikipedia.org/wiki/1957_Formula_One_...
2 1958 https://en.wikipedia.org/wiki/1958_Formula_One_...
0 1956 https://en.wikipedia.org/wiki/1956_Formula_One...
1 1957 https://en.wikipedia.org/wiki/1957_Formula_One...
2 1958 https://en.wikipedia.org/wiki/1958_Formula_One...


API Reference
Expand Down

0 comments on commit f2f26fd

Please sign in to comment.