Updated pytest-timeout changes internal functions
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 48/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Ferma
- Stack tecnologico
- python
- Ambito
- testing-qa
Direzione di ricerca
Inizia da tests/logs.py e tests/pytest_hooks.py, quindi confronta il loro utilizzo di pytest-timeout con le modifiche all’API della versione 2.3.0 descritte nell’issue. Esegui i test debugpy pertinenti; il lavoro è completato quando entrambe le integrazioni di test interessate funzionano con pytest-timeout 2.3.0 senza fare affidamento sulla funzione rimossa né omettere il nuovo argomento.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
pytest-timeout version 2.3.0 has changed two internal functions that debugpy uses in its tests:
write_title()has been removed (used intests/logs.py)dump_stacks()now takes an argument (terminal)
I have addressed the first one in Debian in a hackish way:
--- a/tests/logs.py
+++ b/tests/logs.py
@@ -4,7 +4,7 @@
import io
import os
-import pytest_timeout
+from _pytest._io import TerminalWriter
import sys
from debugpy.common import json, log
@@ -27,5 +27,6 @@
pass
else:
path = os.path.relpath(path, log.log_dir)
- pytest_timeout.write_title(path)
+ out = TerminalWriter()
+ out.sep("+", title=path)
print(s, file=sys.stderr)
but see https://github.com/pytest-dev/pytest/issues/10436 for a warning about this approach. For the second, I've done this:
--- a/tests/pytest_hooks.py
+++ b/tests/pytest_hooks.py
@@ -61,4 +61,4 @@
# we want to print the pydevd log as well. This is not a normal pytest hook - \
we
# just detour pytest_timeout.dump_stacks directly.
_dump_stacks = pytest_timeout.dump_stacks
-pytest_timeout.dump_stacks = lambda: (_dump_stacks(), logs.dump())
+pytest_timeout.dump_stacks = lambda term: (_dump_stacks(term), logs.dump())
- Lingua principale
- Python
- Stelle
- 2.5k
- Fork
- 202
- Merge medio
- 5g 1h
- PR unite (30g)
- 1
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.
Altre issue di microsoft/debugpy
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
-
Document "rules"-option Apertadocumentation
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
-
documentation
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
-
Adapter bootstrap fails with ConnectionRefusedError on WSL2 VirtioProxy or hostAddressLoopback Aperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 68/100
Tutte le issue di microsoft/debugpy
Issue simili
-
area: harness bug status: needs-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
Human-Agent-Society/reef#625 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 80/100
learningequality/kolibri#15351 · 2 commenti ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
-
Name consistency Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
eellak/triplestore#65 · 1 commento ·