Please extend the documentation wrt exceptions that can be raised
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 346
- Forks
- 113
- PR merge metrics
- No merged PRs in 30d
Description
Hello, sometimes the documentation mentions that a method can raise an exception but it doesn't mention the type of the exception. Sometimes there is no mention of any exception at all while it is clear that an exception must be raised. This means that I often end up with except Exception which is not a very good practice.
Let me mention some examples:
webtest.app.TestAppmust raise an exception if theappargument is an invalid stringwebtest.app.TestApp.getand friends must raise an exception ifexpect_errors==Falsewebtest.response.TestResponse.clickmust raise an exception if the link points to a failing URL- https://github.com/Pylons/webtest/issues/134
webtest.forms.Form.submitmust raise an exception if theactionattribute of the form points to a failing URLwebtest.forms.Form.__setitem__must raise an exception if the field does not exist or if the name matches multiple fields
Can you please improve the documentation of the exceptions that may occur?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the documentation and implementations for webtest.app.TestApp and its get methods, webtest.response.TestResponse.click, and webtest.forms.Form.submit and setitem. Reproduce the listed invalid-input and failing-URL cases, consult issue #134, and document the specific exception types for each behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100