Should the value of `error` be mutable?
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 25/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Da chiarire
- Stato di attività
- Ferma
- Ambito
- testing
Direzione di ricerca
Review the perfect-numbers canonical-data.json example and problem-specifications PR 1691, then inspect the immutability CI check and any tests.toml assertions mentioned in the discussion. Decide whether error-only wording changes preserve test meaning; done means the policy is recorded and the relevant validation or assertions are updated consistently.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Example
In perfect-numbers we have this test case:
https://github.com/exercism/problem-specifications/blob/8df6cb2ed8e77aa3ac0c02744cd9ddb83920f5f2/exercises/perfect-numbers/canonical-data.json#L121-L130
And we notice (see https://github.com/exercism/problem-specifications/pull/1691) that we would like to make this change:
{
"uuid": "72445cee-660c-4d75-8506-6c40089dc302",
- "description": "Zero is rejected (not a natural number)",
+ "description": "Zero is rejected (not a positive integer)",
"property": "classify",
"input": {
"number": 0
},
"expected": {
- "error": "Classification is only possible for natural numbers."
+ "error": "Classification is only possible for positive integers."
}
We seem to have decided that description is allowed to mutate when the "meaning is unchanged" (that is, we do not add a reimplements test case for e.g. a simple description-only typo fix).
The question is: should the contents of an error also be considered mutable when the "meaning is unchanged", or should that require a new test case?
Discussion
My initial opinion is something like:
- We said that
descriptionshould be mutable if we don't change the "meaning" of the test. - There are some useful error-message changes that don't change the "meaning" of the test either, and the value of
erroris similar to the "description" of the error. In the limiting case, it seems messy to add a new test case just to fix a typo in anerrorvalue. - Therefore, directly mutating the
errorvalue should similarly be allowed when the "meaning is unchanged".
Drawbacks:
- Is there a track that asserts something about the contents of the error message for this kind of test? Such a track would have to update that assertion, even though their
tests.tomldidn't change. - The CI check for immutability would need to check that
expecteddoesn't change, but make a special case for anerror-only change.
- Lingua principale
- Ruby
- Stelle
- 362
- Fork
- 566
- Merge medio
- 15h 13m
- PR unite (30g)
- 8
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 exercism/problem-specifications
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 90/100
exercism/problem-specifications#2686 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
exercism/problem-specifications#2704 · 21 commenti · 8 reazioni ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 1-3 ore Idoneità per principianti 35/100
exercism/problem-specifications#2153 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
exercism/problem-specifications#2120 · 7 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
exercism/problem-specifications#2108 · 1 commento · 5 reazioni ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di exercism/problem-specifications
Issue simili
-
Bug Ruby Waiting for: Product Owner
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
getsentry/sentry-ruby#3228 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno
-
開発用DockerイメージにPlaywrightのシステム依存を追加するForse già presa @momocus l’ha presa oggi. Aperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 85/100
sakazuki-org/sakazuki#1453 ·
I maintainer di solito rispondono entro 3 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
jenkins-infra/jenkins.io#9615 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno