mirror of
https://github.com/dtomlinson91/tembo.git
synced 2025-12-22 06:15:45 +00:00
adding latest
This commit is contained in:
16
TODO.todo
16
TODO.todo
@@ -20,6 +20,22 @@ Documentation:
|
||||
|
||||
☐ Document how to use pytest to read a logging message
|
||||
<https://stackoverflow.com/questions/53125305/testing-logging-output-with-pytest>
|
||||
- caplog as fixture
|
||||
- reading `caplog.records[0].message`
|
||||
see `_old_test_pages.py`
|
||||
|
||||
☐ Document testing value of an exception raised
|
||||
When you use `with pytest.raises` you can use `.value` to access the attributes
|
||||
reading `.value.code`
|
||||
reading `str(.value)`
|
||||
|
||||
☐ Document working with exceptions
|
||||
☐ General pattern - raise exceptions in codebase, catch them in the CLI.
|
||||
Allows people to use via an API and handle the exceptions themselves.
|
||||
You can use python builtins but custom exceptions are better for internal control
|
||||
☐ Capturing exceptions in the CLI.
|
||||
Access the message of the exception with `.args[0]`.
|
||||
use `raise SystemExit(1) from exception` in order to gracefully exit
|
||||
|
||||
☐ Document using datadir with a module rather than a shared one. Link to tembo as an example.
|
||||
☐ Can prospector ignore tests dir? document this in the gist if so
|
||||
|
||||
Reference in New Issue
Block a user