First time here? Check out the FAQ!
1

Mixing django tests and unittest files in the window of the testing tools

If my understanding is correct , Testingtool window can show django tests under manage.py and other tests that can be added outside of manage.py. My problem is how can I add a full directory in the testing tool and at the same time set the testing tab property to Unittest. Presently if I add a regex in the project properties it adds all the files but does not show the tests under a directory. It includes all the files individually and moreover I would have to set the testing tab property individually for each file.

piscvau's avatar
581
piscvau
asked 2025-01-08 06:02:27 -0600
Wingware Admin's avatar
241
Wingware Admin
updated 2025-01-09 19:57:28 -0600
edit flag offensive 0 remove flag close merge delete

Comments

add a comment see more comments

1 Answer

0

The Testing tool just shows all the tests in a list and not sorted into directories. You should be able to have both Django tests and unittest tests but need to set the Test Framework under the Testing tab of File Properties and/or the Default Test Framework in the Testing tab of Project properties. The easiest is probably to set the latter to unittest and then go into File Properties for manage.py and set Test Framework there to Django Tests. If you set Default Test Framework to Django Tests instead, you'ld have to set the File Properties for all the unittest test files, which is probably a lot of effort, so better to have the default be unittest and set the File Property just on manage.py.

Wingware Admin's avatar
241
Wingware Admin
answered 2025-01-09 19:57:07 -0600
edit flag offensive 0 remove flag delete link

Comments

add a comment see more comments

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss.

Add Answer