[TIP] unittest: Request to review of a project layout

c.buhtz at posteo.jp c.buhtz at posteo.jp
Sat Jul 2 09:35:11 PDT 2022


Hi,
I'm not well experienced in the directory-layout of python projects but
I would like to get opinions of some more experienced python
developers. I want to see if I am on the right way with my own thoughts.

There is this project where I am not the maintainer:
https://github.com/DeepSpace2/StyleFrame

I assume that something is wrong or unusual with how the tests are
organized because I am not able to run specific test classes or
methods.

Running all tests via discover works without problems:
"python3 -m unittest"

For example I want to run the class "StyleFrameTest" (in
style_frame_tests.py). My current working directory is the project root.

"python3 -m unittest styleframe.tests.style_frame_tests.StyleFrameTest"

No test is found. But via discover the "StyleFrameTest" class is
found and "executed".

Do I do something wrong?

Or does this problem occur because of the project layout?

What can I learn from that case and how could the project be improved?

Kind
Christian



More information about the testing-in-python mailing list