Specify dependency of each test case
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 25/100
Direzione di ricerca
Inizia esaminando i metodi di test e i meccanismi esistenti di array_helpers e di stubbing dei moduli. Indaga quindi sull'hook di raccolta di pytest e su come la suite rappresenta le funzioni di primo livello, i metodi degli oggetti array e gli operatori. L'implementazione deve includere una rappresentazione definita delle dipendenze, un grafo delle dipendenze e una prioritizzazione dei test o un salto dei test consapevoli delle dipendenze.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
The test suite is mostly made up of test methods for each function (or array object method) in the spec. The majority of these tests require other functions to do everything we want, which is problematic when an underlying function does not work—you'll get a lot of spammy errors that actually relate to a single fundamental problem... or even false positives.
So I think it would be a good idea if we declared the dependencies of each test method, i.e. the functions we use and assume has correct behaviour. We could use these declarations to create a dependency graph, which could be hooked with pytest to prioritise zero/low-dependency tests first, and by default skipping tests that use functions we've deemed incorrect. This will benefit:
- Array API adoptors, who would much more easily see what they should prioritise developing
- Us, who'd be able to see areas where we can try to cut down the functions we depend on
Ideas for declaring dependencies per test method:
- Decorator which lists function and method names
- Automatically infer dependencies via looking at function code (either searching the code as string, or using the AST)
General challenges would be:
- How to get pytests collection hook to do this
- Supporting array object methods alongside the top-level functions
- As well as operator symbols
The dependency graph + auto skipping would also allow us to:
- Remove some mirrored functions in
array_helpers - Remove the module stubbing mechanism
- Check that no tests is using the function they're testing for assertions
- Lingua principale
- Python
- Stelle
- 74
- Fork
- 54
- Merge medio
- 4h 35m
- PR unite (30g)
- 4
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
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 data-apis/array-api-tests
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 87/100
data-apis/array-api-tests#465 · 1 commento ·
-
Test reflected operators?Aperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 68/100
data-apis/array-api-tests#460 · 1 commento ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 68/100
data-apis/array-api-tests#455 · 2 commenti ·
-
tracking
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
data-apis/array-api-tests#381 · 9 commenti ·
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 38/100
data-apis/array-api-tests#379 · 10 commenti ·
Tutte le issue di data-apis/array-api-tests
Issue simili
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 92/100
raullenchai/Rapid-MLX#4042 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
LearningCircuit/local-deep-research#7067 ·
I maintainer di solito rispondono entro 1 giorno
-
#bug
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 92/100
apache/superset#44923 · 1 commento ·
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
lawndoc/stack-back#123 ·