Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Split tests into smaller sub-tests

Aperta
#316 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
25/100
Tipo di issue
Refactoring
Chiarezza
Da chiarire
Stato di attività
Ferma
Stack tecnologico
python
Ambito
testing

Direzione di ricerca

Non vengono indicati file o test. Inizia individuando l'attuale struttura con un test per funzione e verificando come Hypothesis gestisce gli esempi e il comportamento di xfail; il refactoring è completato quando le asserzioni possono essere riportate e contrassegnate come xfailed indipendentemente, senza compromettere le asserzioni che dipendono da controlli precedenti.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

low priority

Right now there is one test per function. This has worked so far, but it has limitations. The main problem is that if a single thing fails in a test, you can't really get at any of the assertions that come after it. And even if hypothesis could generate separate examples for separate assertions, if you are maintaining a library and you want to xfail a given assertion, you have to xfail the whole test.

This is going to be important for reporting, because it will make it easier to report on exactly which things a given function isn't compliant on. However, this is also a pretty big refactor. It also could be challenging in some cases if some assertion actually depends on a previous assertion working to make sense (e.g., maybe some assertion will implicitly assume a given shape because it was already asserted). For this reason, I would consider this to be lower priority for now, and not worry about implementing it until it becomes needed for reporting (although it certainly doesn't hurt to start thinking about how it might work).

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

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di data-apis/array-api-tests

Tutte le issue di data-apis/array-api-tests

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.