add twisted.trial.unittest.mark for marking test functions in a type safe way
Open
@graingert is already working on this.
Since Jun 28, 2022.
core
enhancement
new
priority-normal
- Dominant language
- Python
- Stars
- 6k
- Forks
- 1.2k
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 10
Description
| @graingert reported | |
|---|---|
| Trac ID | trac#10221 |
| Type | enhancement |
| Created | 2021-07-11 13:46:08Z |
I want to avoid code like this:
I want to be able to do:
def test_pass(self):
...
test_pass.timeout = 2 # type: ignore[attr-defined]
but in a type safe way:
@unittest.mark(timeout=2)
def test_pass(self):
...
@unittest.mark(timeout="four") # mypy error!
def test_eggs(self):
...
Searchable metadata
trac-id__10221 10221
type__enhancement enhancement
reporter__graingert graingert
priority__normal normal
milestone__None None
branch__
branch_author__
status__new new
resolution__None None
component__core core
keywords__None None
time__1626011168755828 1626011168755828
changetime__1642026499116405 1642026499116405
version__None None
owner__graingert graingert
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.
Assessment
This issue has not been assessed yet.