beeware / cricket

A GUI tool for running Python test suites.
BSD 3-Clause "New" or "Revised" License
213 stars 69 forks source link

Add cmd line option for directory to inspect #90

Open DarkTrick opened 3 years ago

DarkTrick commented 3 years ago

Is your feature request related to a problem? Please describe. cricket discovers all tests under the current directory. I then end up with > 300 unittests shows, while I'm only interested in one single module.

Describe the solution you'd like An equivalent of python -m unittest discover [module name] from command line.

Describe alternatives you've considered No real ones. I can only start cricket in the main dir and then minimize all test modules until I find my module of interest.

freakboy3742 commented 3 years ago

Thanks for the suggestion. I can definitely appreciate the problem you're faced with, and I can see how the command line option you've suggested would address that problem.

However, I wonder if an alternative would be improved search/filtering on the main tree? If you were easily able to find the test module of interest inside the GUI, you wouldn't need to restart the app every time your module of interest changed. Would that make sense to you?

DarkTrick commented 3 years ago

Thank you for taking on the problem so quick.

I like the idea of having a good filter option. However, for now I think it would be more helpful/efficient to implement a cmd line solution first (cost-benefit ratio is bigger here, imho).

Pros I see for the command line suggestion:

[1] This is related to some other issues with cricket, which force me to restart it regularly. So even a nice filtering function on the GUI would be rather tedious to use at the moment. Here are some examples:

No complains ↑

1/2 OT: The main problem is actually Python's really inappropriate importing rules (no cricket), which prevent execution from within a sub package. It would be nice to have an option within cricket, though.