Add pytest to optional dependencies in check_dependecies.py

This commit is contained in:
Martin Zibricky 2011-09-02 13:10:07 +02:00
parent b24a73d806
commit e4f3041802
2 changed files with 7 additions and 2 deletions

View File

@ -261,8 +261,10 @@ def main(args=None):
app.setApplicationName(u'OpenLP')
app.setApplicationVersion(get_application_version()[u'version'])
# Instance check
if app.isAlreadyRunning():
sys.exit()
if not options.testing:
# Instance check
if app.isAlreadyRunning():
sys.exit()
# First time checks in settings
if not QtCore.QSettings().value(u'general/has run wizard',
QtCore.QVariant(False)).toBool():
@ -284,5 +286,7 @@ def main(args=None):
# Do not run method app.exec_() when running gui tests
if options.testing:
app.run(qt_args, testing=True)
# For gui tests we need access to window intances and their components
return app
else:
sys.exit(app.run(qt_args))

View File

@ -80,6 +80,7 @@ OPTIONAL_MODULES = [
('sqlite', ' (SQLite 2 support)'),
('MySQLdb', ' (MySQL support)'),
('psycopg2', ' (PostgreSQL support)'),
('pytest', ' (testing framework)'),
]
w = sys.stdout.write