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

Add cmd line option for directory to inspect #90

Open
DarkTrick opened this issue Dec 13, 2020 · 2 comments
Open

Add cmd line option for directory to inspect #90

DarkTrick opened this issue Dec 13, 2020 · 2 comments
Labels
enhancement New features, or improvements to existing features.

Comments

@DarkTrick
Copy link

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.

@DarkTrick DarkTrick added the enhancement New features, or improvements to existing features. label Dec 13, 2020
@freakboy3742
Copy link
Member

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
Copy link
Author

DarkTrick commented Dec 15, 2020

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:

  • Dev: I guess it would be rather easy to implement.
  • User: I think handling of the feature would be quicker:
    • You can start cricket with "filter" enabled via cmd line (2 key presses after first use) [1].
    • Switching over to the mouse for focusing filtering options will always be slower [1].
  • Startup: In a huge project loading everything might take a while. Not even considering unneded packages might speed up the process.

[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:

  • Test name changed -> old test name stays forever
  • Test fails badly (e.g. syntax error) -> Run never finishes
  • Test errors -> errored test report stays even if the test gets fixed.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New features, or improvements to existing features.
Projects
None yet
Development

No branches or pull requests

2 participants