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

The user should be able to discover test files similar to how unittest discovers #27

Open
pebreo opened this issue Nov 11, 2013 · 2 comments

Comments

@pebreo
Copy link

pebreo commented Nov 11, 2013

Cricket seems only to look for test*.py files, it would be nice to have the ability to discover like Python's unittest module discovers. The syntax would be like this:

$ cricket-unittest discover -s <directory> -p <pattern>
e.g.
$ cricket-unittest -m discover tests '*_tests.py'

@freakboy3742
Copy link
Member

A reasonable suggestion; it also shouldn't be too hard to implement.

If you want to try your hand, the place you need to implement is:

https://github.com/pybee/cricket/blob/master/cricket/unittest/discoverer.py

You'll also need to modify the base Project class to add command line arguments; see the way the Django discoverer works in:

https://github.com/pybee/cricket/blob/master/cricket/django/model.py

if you want an analog.

@pebreo
Copy link
Author

pebreo commented Nov 12, 2013

Yes, I'll give it a shot. I will post drafts here and if you like them I will send a pull request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants