Mercurial > hg > configuration
view tests/example.py @ 17:a78ab14ae376
separate thing to add options to its own function
author | Jeff Hammel <jhammel@mozilla.com> |
---|---|
date | Mon, 26 Mar 2012 12:04:49 -0700 |
parents | 12162afcd78f |
children | cadc9514f60a |
line wrap: on
line source
from configuration import Configuration class ExampleConfiguration(Configuration): """example configuration instance""" options = { 'activeTests': {'type': list, 'required': "No tests specified; please specify --activeTests", 'help': 'Specify tests to run', 'flags': ['-a', '--activeTests']}, # command line flags 'title': {'help': 'talos run title'}, 'browser_path': {'required': True, 'flags': ['-e', '--executablePath'], 'help': 'path to firefox'} } if __name__ == '__main__': parser = ExampleConfiguration().parser() parser.parse_args()