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