You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Traceback (most recent call last):
File "/Users/alex/work/logfire/.venv/lib/python3.12/site-packages/inline_snapshot/_inline_snapshot.py", line 284, in check
old_value_element, old_node_element =next(old)
^^^^^^^^^
StopIteration
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/Users/alex/work/logfire/.venv/bin/pytest", line 8, in <module>
sys.exit(console_main())
^^^^^^^^^^^^^^
File "/Users/alex/work/logfire/.venv/lib/python3.12/site-packages/_pytest/config/__init__.py", line 201, in console_main
code = main()
^^^^^^
File "/Users/alex/work/logfire/.venv/lib/python3.12/site-packages/_pytest/config/__init__.py", line 175, in main
ret: ExitCode |int= config.hook.pytest_cmdline_main(config=config)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/alex/work/logfire/.venv/lib/python3.12/site-packages/pluggy/_hooks.py", line 513, in __call__returnself._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/alex/work/logfire/.venv/lib/python3.12/site-packages/pluggy/_manager.py", line 120, in _hookexecreturnself._inner_hookexec(hook_name, methods, kwargs, firstresult)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/alex/work/logfire/.venv/lib/python3.12/site-packages/pluggy/_callers.py", line 139, in _multicallraise exception.with_traceback(exception.__traceback__)
File "/Users/alex/work/logfire/.venv/lib/python3.12/site-packages/pluggy/_callers.py", line 103, in _multicall
res = hook_impl.function(*args)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/alex/work/logfire/.venv/lib/python3.12/site-packages/_pytest/main.py", line 330, in pytest_cmdline_mainreturn wrap_session(config, _main)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/alex/work/logfire/.venv/lib/python3.12/site-packages/_pytest/main.py", line 318, in wrap_session
config.hook.pytest_sessionfinish(
File "/Users/alex/work/logfire/.venv/lib/python3.12/site-packages/pluggy/_hooks.py", line 513, in __call__returnself._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/alex/work/logfire/.venv/lib/python3.12/site-packages/pluggy/_manager.py", line 120, in _hookexecreturnself._inner_hookexec(hook_name, methods, kwargs, firstresult)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/alex/work/logfire/.venv/lib/python3.12/site-packages/pluggy/_callers.py", line 139, in _multicallraise exception.with_traceback(exception.__traceback__)
File "/Users/alex/work/logfire/.venv/lib/python3.12/site-packages/pluggy/_callers.py", line 122, in _multicall
teardown.throw(exception) # type:ignore[union-attr]^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/alex/work/logfire/.venv/lib/python3.12/site-packages/_pytest/logging.py", line 868, in pytest_sessionfinishreturn (yield)
^^^^^
File "/Users/alex/work/logfire/.venv/lib/python3.12/site-packages/pluggy/_callers.py", line 124, in _multicall
teardown.send(result) # type:ignore[union-attr]^^^^^^^^^^^^^^^^^^^^^
File "/Users/alex/work/logfire/.venv/lib/python3.12/site-packages/_pytest/terminal.py", line 903, in pytest_sessionfinishself.config.hook.pytest_terminal_summary(
File "/Users/alex/work/logfire/.venv/lib/python3.12/site-packages/pluggy/_hooks.py", line 513, in __call__returnself._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/alex/work/logfire/.venv/lib/python3.12/site-packages/pluggy/_manager.py", line 120, in _hookexecreturnself._inner_hookexec(hook_name, methods, kwargs, firstresult)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/alex/work/logfire/.venv/lib/python3.12/site-packages/pluggy/_callers.py", line 139, in _multicallraise exception.with_traceback(exception.__traceback__)
File "/Users/alex/work/logfire/.venv/lib/python3.12/site-packages/pluggy/_callers.py", line 122, in _multicall
teardown.throw(exception) # type:ignore[union-attr]^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/alex/work/logfire/.venv/lib/python3.12/site-packages/_pytest/terminal.py", line 925, in pytest_terminal_summaryreturn (yield)
^^^^^
File "/Users/alex/work/logfire/.venv/lib/python3.12/site-packages/pluggy/_callers.py", line 122, in _multicall
teardown.throw(exception) # type:ignore[union-attr]^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/alex/work/logfire/.venv/lib/python3.12/site-packages/_pytest/warnings.py", line 132, in pytest_terminal_summaryreturn (yield)
^^^^^
File "/Users/alex/work/logfire/.venv/lib/python3.12/site-packages/pluggy/_callers.py", line 103, in _multicall
res = hook_impl.function(*args)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/alex/work/logfire/.venv/lib/python3.12/site-packages/inline_snapshot/pytest_plugin.py", line 218, in pytest_terminal_summaryfor change in snapshot._changes():
File "/Users/alex/work/logfire/.venv/lib/python3.12/site-packages/inline_snapshot/_inline_snapshot.py", line 753, in _changesyield fromself._value._get_changes()
File "/Users/alex/work/logfire/.venv/lib/python3.12/site-packages/inline_snapshot/_inline_snapshot.py", line 398, in _get_changesyield from check(self._old_value, self._ast_node, self._new_value)
RuntimeError: generator raised StopIteration
You will also see a test failure caused by #112, that's unrelated, the same error happens when the test is deleted.
No tests need fixing. pytest alone passes fine. If I wrap the offending loop body in inline-snapshot with:
try:
...
exceptStopIteration:
break
then pytest --inline-snapshot=fix completes fine without making any changes. I'm guessing this happens when generating the Update snapshots report, which BTW I would be quite happy to not see at all.
The text was updated successfully, but these errors were encountered:
Can you work for now without star expressions in snapshots?
I find your tests really cool and star expressions can be really useful with snapshots, but the problem is that they are not supported by the current implementation.
I will check for them and warn the user that snapshots with star-expressions are currently not supported. I hope this is ok for you.
I will also look into your updates and try to figure out why they are so noisy.
make install
pytest --inline-snapshot=fix
Results in:
You will also see a test failure caused by #112, that's unrelated, the same error happens when the test is deleted.
No tests need fixing.
pytest
alone passes fine. If I wrap the offending loop body in inline-snapshot with:then
pytest --inline-snapshot=fix
completes fine without making any changes. I'm guessing this happens when generating theUpdate snapshots
report, which BTW I would be quite happy to not see at all.The text was updated successfully, but these errors were encountered: