MagicMock __aenter__ should be AsyncMock(return_value=MagicMock())
Offen
Dieses Issue hat noch niemand übernommen.
3.8 (EOL)
3.9 (EOL)
tests
type-bug
- Vorherrschende Sprache
- Python
- Sterne
- 77.2k
- Forks
- 36k
- PR-Merge-Kennzahlen
- PR-Kennzahlen ausstehend
Beschreibung
| 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']
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginne damit, die Behandlung asynchroner Context Manager durch MagicMock und die vorhandenen Tests für asyncio-Mocks zu finden. Überprüfe das aktuelle Verhalten von aenter, aktualisiere dann das relevante Verhalten so, dass es ein AsyncMock ist, das einen MagicMock zurückgibt, und füge Tests hinzu, die dieses Ergebnis nachweisen.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- python
- Bereich
- testing
- Issue-Typ
- Bug
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 45/100