-
-
Notifications
You must be signed in to change notification settings - Fork 309
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[14.0][FIX] l10n_it_fatturapa_in: test improvement #3479
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Forse si ottiene lo stesso risultato rinominando il test in modo che venga eseguito nell'ordine corretto? tipo test_54_duplicated_vat_on_partners
Sì ma il punto è quello di renderlo eseguibile separatamente. I test dovrebbero dipendere solo da oggetti creati a livello di setUp (o ancora meglio a livello di classe), in modo che l'ambiente sia ben documentato. Avere un test che dipende da un side-effect di un test eseguito precedentemente oltre che impedire l'esecuzione singola del test (molto utile in caso debug), crea anche un potenziale problema futuro se i test precedenti vengono modificati/migliorati. |
/ocabot rebase |
Make one test independent from others (to be excuted in isolation)
Congratulations, PR rebased to 14.0. |
93c8783
to
93d6249
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Grazie della PR!
Ho proposto un'altra soluzione, secondo me più lineare, ma non vedo problemi con quella proposta
invoice_id = res.get("domain")[0][2][0] | ||
invoice = self.invoice_model.browse(invoice_id) | ||
invoice.ref = invoice.payment_reference = "14dupvat" | ||
supplier = self.env["res.partner"].search( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Quindi per assurdo, questo test non è coperto dai test!
Non si potrebbe invece usare un'altra partita IVA che non è ancora stata usata per questo partner? Ho trovato https://strumentidev.it/generatore/partita-iva per generarne di valide.
Ho riletto questa PR, questi test sono di tipo |
There hasn't been any activity on this pull request in the past 4 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days. |
Make one test independent from others (to be excuted in isolation)