Hi all, new Django contributor here.
I’m trying to add some tests to the Django test suite in advance of writing a patch, and it seems that the test suite just doesn’t pick up my new test if it’s not written correctly. So this works as expected:
class SomeTestCase(TestCase): def test_something(self): raise Exception("My exception")
I run the test and get an exception. However, if I try to add a decorator used elsewhere in the test suite to the test:
class SomeTestCase(TestCase): @override_settings(MIDDLEWARE=) def test_something(self): raise Exception("My exception")
The test never even gets picked up and the exception isn’t thrown. This is quite annoying as I’m not sure why the test isn’t getting picked up, and therefore aren’t sure how to fix it.
Am I missing something here? Is there some way to make it show why the test wasn’t picked up?
Note: I’ve tried running with the
--v=3 flag, which shows that the application my test is in being loaded, but doesn’t show anything I would consider useful in terms of why it might be skipping my test.