diff --git a/README.md b/README.md index e792391c..cfcf364d 100644 --- a/README.md +++ b/README.md @@ -40,7 +40,6 @@ client = Browserbase( session = client.sessions.create( project_id=BROWSERBASE_PROJECT_ID, ) -``` def run(playwright: Playwright) -> None: @@ -301,6 +300,7 @@ By default requests time out after 1 minute. You can configure this with a `time which accepts a float or an [`httpx.Timeout`](https://www.python-httpx.org/advanced/timeouts/#fine-tuning-the-configuration) object: ```python +import httpx from browserbase import Browserbase # Configure the default for all requests: diff --git a/tests/test_readme.py b/tests/test_readme.py new file mode 100644 index 00000000..89dbc18d --- /dev/null +++ b/tests/test_readme.py @@ -0,0 +1,7 @@ +import re +from pathlib import Path + + +def test_readme_code_fences_are_balanced() -> None: + fences = re.findall(r"^```(.*)$", (Path(__file__).parent.parent / "README.md").read_text(), re.M) + assert fences[1::2] == [""] * (len(fences) // 2) and all(fences[::2])