view tests/example.py @ 144:df5350aee9c3

not sure what i did here
author Jeff Hammel <k0scist@gmail.com>
date Thu, 11 Dec 2014 18:07:10 -0800
parents c530f6265deb
children
line wrap: on
line source

#!/usr/bin/env python

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'},
        'develop': {'help': "useful for running tests on a developer machine. Creates a local webserver and doesn't upload to the graph servers.",
                    'type': bool},
        'test_timeout': {'help': "Time to wait for the browser to output to the log file",
                         'default': 1200},
        'preferences': {'help': 'profile preferences',
                        'default': {'browser.bookmarks.max_backups': 0,
                                    'browser.cache.disk.smart_size.enabled': False},
                        'flags': ['-p', '--pref']}
        }
    extend = set(['preferences'])

if __name__ == '__main__':
    from pprint import pprint
    options, args = ExampleConfiguration().parse_args()
    pprint(options.__dict__)