diff --git a/pyproject.toml b/pyproject.toml index 6af632f..11ef2b9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -9,7 +9,7 @@ include = ["/README.md", "/Makefile", "/pytest_examples", "/tests"] [project] name = "pytest-examples" -version = "0.0.14" +version = "0.0.15" description = "Pytest plugin for testing examples in docstrings and markdown files." authors = [ {name = "Samuel Colvin", email = "s@muelcolvin.com"}, diff --git a/pytest_examples/find_examples.py b/pytest_examples/find_examples.py index 9f6523f..123bb8d 100644 --- a/pytest_examples/find_examples.py +++ b/pytest_examples/find_examples.py @@ -76,7 +76,7 @@ def prefix_settings(self) -> dict[str, str]: This works on the format `py foo="bar" spam="with space"`. """ settings = {} - for m in re.finditer(r'(\S+?)=([\'"])(.+?)\2', self.prefix): + for m in re.finditer(r'([^{\s]+?)=([\'"])(.+?)\2', self.prefix): settings[m.group(1)] = m.group(3) return settings diff --git a/uv.lock b/uv.lock index 788970b..80b43d2 100644 --- a/uv.lock +++ b/uv.lock @@ -330,7 +330,7 @@ wheels = [ [[package]] name = "pytest-examples" -version = "0.0.14" +version = "0.0.15" source = { editable = "." } dependencies = [ { name = "black" },