beeware / cricket

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

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

Open pebreo opened 10 years ago

pebreo commented 10 years ago

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 commented 10 years ago

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 commented 10 years ago

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