-
Notifications
You must be signed in to change notification settings - Fork 680
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
Vision: Simplify test setup #367
Comments
I cannot agree more. The Ideally, I imagine this as the least that we can do:
With a bit more effort we can also probably generalize the At some point if I have the time, I would really like to work on this. |
Hey, is anyone still working on this? Due to the inactivity this issue has been automatically marked as stale. It will be closed if no further activity occurs. Thank you for your contributions. |
I have a vague guess that maybe @KiChjang would be interested in this. |
Indeed, it looks to me that a derive macro like |
Re-posting my suggestion paritytech/substrate#12130 (comment) since I think it might be a good starting point for this. |
|
They are many duplicated setup code required for any new modules, mostly config
system::Trait
. There must be a way to avoid duplicate this code all over the places.It also make any modification to
system::Trait
tedious as it have to change every single module test setup.I am not sure what is the best way, but at least a macro can avoid most of the duplications.
All those code are duplicated and irrelevant for most of the tests
https://github.com/paritytech/substrate/blob/9b3e9f32cd5243d2eeff3d5d8337033aa64c091b/srml/aura/src/mock.rs#L35-L63
The text was updated successfully, but these errors were encountered: