MagicMock __aenter__ should be AsyncMock(return_value=MagicMock())
Aperta
Nessuno ha ancora preso questa issue.
3.8 (EOL)
3.9 (EOL)
tests
type-bug
- Lingua principale
- Python
- Stelle
- 77.2k
- Fork
- 36k
- Metriche di merge delle PR
- Metriche PR in attesa
Descrizione
| BPO | 40406 |
|---|---|
| Nosy | @briancurtin, @asvetlov, @1st1, @graingert, @lisroach, @tirkarthi |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
assignee = None
closed_at = None
created_at = <Date 2020-04-27.13:33:28.877>
labels = ['3.8', 'type-bug', 'tests', '3.9', 'expert-asyncio']
title = 'MagicMock __aenter__ should be AsyncMock(return_value=MagicMock())'
updated_at = <Date 2020-12-07.23:23:01.700>
user = 'https://github.com/graingert'
bugs.python.org fields:
activity = <Date 2020-12-07.23:23:01.700>
actor = 'simon.d.beal'
assignee = 'none'
closed = False
closed_date = None
closer = None
components = ['Tests', 'asyncio']
creation = <Date 2020-04-27.13:33:28.877>
creator = 'graingert'
dependencies = []
files = []
hgrepos = []
issue_num = 40406
keywords = []
message_count = 4.0
messages = ['367419', '367420', '367903', '367913']
nosy_count = 7.0
nosy_names = ['brian.curtin', 'asvetlov', 'yselivanov', 'graingert', 'lisroach', 'xtreak', 'simon.d.beal']
pr_nums = []
priority = 'normal'
resolution = None
stage = None
status = 'open'
superseder = None
type = 'behavior'
url = 'https://bugs.python.org/issue40406'
versions = ['Python 3.8', 'Python 3.9']
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Inizia individuando la gestione dei context manager asincroni di MagicMock e i test esistenti per i mock di asyncio. Verifica il comportamento attuale di aenter, quindi aggiorna il comportamento pertinente in modo che sia un AsyncMock che restituisce un MagicMock e aggiungi una copertura che dimostri tale risultato.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- python
- Ambito
- testing
- Tipo di issue
- Bug
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 45/100