beeware / cricket

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

Add argument parser to provide --settings option #11

Closed roadsideseb closed 11 years ago

roadsideseb commented 11 years ago

I've added a --settings which allows to specify the settings file to use on the command line similar to how manage.py works. I am not sure whether argparse is the right choice here, though. Since Django seems to use optparse, that might be more appropriate and I don't know what the best way would be looking towards Python 3 support. What do you think?

roadsideseb commented 11 years ago

I've updated the PR after your refactoring of the main() functions. I've added the ArgumentParser so that it can be used by any subclass of Project. There might be a nicer way to allow adding arguments. I have the feeling there's a more elegant solution to add arguments than using a class method. Any suggestions?