Skip to content
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

test case class hierarchy is slightly confusing and inconsistent. #328

Open
nanorepublica opened this issue Feb 19, 2019 · 1 comment
Open
Assignees

Comments

@nanorepublica
Copy link
Contributor

Hi!

During our upgrade to the latest version of waffle, we had a few of our tests fail due to the cache not being flushed when an object is deleted from override_*.

While preparing to submit a patch for this I found it strange that I was unable to reproduce the failure within the waffle tests. So it turns out from what I can see that waffle uses Django TestCase, TransactionTestCase, a custom child of TransactionTestCase (called TestCase as well) and just functions as well.

I imagine this has happened given the contributions over time, but it would be great to have some clarification over which test case class to use. Or should certain aspects be tested against multiple test case classes (eg test_testutils.py)?

Specifically, we only use Django TestCase which generated the failures, but TransactionTestCase did not generate any failures.

PS Long time happy user, wanting to make it better 😄

@clintonb
Copy link
Collaborator

The flushing issue might be related to #317.

As for tests, I agree that is confusing. One of my goals for this project is to clean the tests and, hopefully, switch to testing with pytest. That work has not begun. In the interim feel free to create your patch with whatever test case makes the most sense. I will modify it later, if needed, once the tests are in a better state.

I will leave this ticket open as a reminder to myself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants