Join Nostr
2025-01-01 22:38:23 UTC

Marijke Luttekes on Nostr: Developers; regarding unit tests. I know it's generally frowned-up to generalize test ...

Developers; regarding unit tests.

I know it's generally frowned-up to generalize test code outside of the current module…

I have some Django admin view availability tests that I want to repeat over multiple apps. They are already parameterized (it's pytest).

Rather than copy/pasting them everywhere, I am considering moving them to an extendable class, so you'll only need to implement them with one or two configuration attributes.

What do we think about this?

#Django #Python