We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Given this code:
class SomeCharm(ops.CharmBase): ... def _on_relation(self, event): assert event.something == some_sanity_check
I'd expect to run pytest --pdb and get dropped into this failing assertion line.
pytest --pdb
Instead, I'm getting:
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> entering PDB >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> PDB post_mortem >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> > /code/hexanator/.tox/unit/lib/python3.12/site-packages/scenario/runtime.py(469)exec() -> raise UncaughtCharmError( (Pdb)
And I can't get to the original line that triggered the exception.
Here's a cleaned up back trace for reference:
_pytest/python.py(162)pytest_pyfunc_call() -> result = testfunction(**testargs) tests/unit/test_scenario.py(56)test_rate_limit() -> ctx.run(ctx.on.relation_created(relation), initial_state) scenario/context.py(613)run() -> with self._run_event(event=event, state=state) as ops: contextlib.py(158)__exit__() -> self.gen.throw(value) scenario/context.py(598)_run_event() -> with self._run(event=event, state=state) as ops: contextlib.py(158)__exit__() -> self.gen.throw(value) scenario/context.py(660)_run() -> with runtime.exec( contextlib.py(158)__exit__() -> self.gen.throw(value) scenario/runtime.py(469)exec() -> raise UncaughtCharmError(
The text was updated successfully, but these errors were encountered:
See also #76.
Sorry, something went wrong.
Moved to canonical/operator#1428
No branches or pull requests
Given this code:
I'd expect to run
pytest --pdb
and get dropped into this failing assertion line.Instead, I'm getting:
And I can't get to the original line that triggered the exception.
Here's a cleaned up back trace for reference:
The text was updated successfully, but these errors were encountered: