2011-09-02 11:15:41 +00:00
|
|
|
#!/usr/bin/env python
|
|
|
|
# -*- coding: utf-8 -*-
|
|
|
|
# vim: autoindent shiftwidth=4 expandtab textwidth=80 tabstop=4 softtabstop=4
|
|
|
|
|
|
|
|
###############################################################################
|
|
|
|
# OpenLP - Open Source Lyrics Projection #
|
|
|
|
# --------------------------------------------------------------------------- #
|
|
|
|
# Copyright (c) 2008-2011 Raoul Snyman #
|
|
|
|
# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
|
2012-06-22 14:14:53 +00:00
|
|
|
# Corwin, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, #
|
|
|
|
# Meinert Jordan, Armin Köhler, Edwin Lunando, Joshua Miller, Stevan Pettit, #
|
|
|
|
# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, #
|
|
|
|
# Simon Scudder, Jeffrey Smith, Maikel Stuivenberg, Martin Thompson, Jon #
|
|
|
|
# Tibble, Dave Warnock, Frode Woldsund #
|
2011-09-02 11:15:41 +00:00
|
|
|
# --------------------------------------------------------------------------- #
|
|
|
|
# This program is free software; you can redistribute it and/or modify it #
|
|
|
|
# under the terms of the GNU General Public License as published by the Free #
|
|
|
|
# Software Foundation; version 2 of the License. #
|
|
|
|
# #
|
|
|
|
# This program is distributed in the hope that it will be useful, but WITHOUT #
|
|
|
|
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or #
|
|
|
|
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for #
|
|
|
|
# more details. #
|
|
|
|
# #
|
|
|
|
# You should have received a copy of the GNU General Public License along #
|
|
|
|
# with this program; if not, write to the Free Software Foundation, Inc., 59 #
|
|
|
|
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
|
|
|
|
###############################################################################
|
|
|
|
|
|
|
|
"""
|
|
|
|
This script is used to run set of automated tests of OpenLP. To start tests,
|
|
|
|
simply run this script::
|
|
|
|
|
|
|
|
@:~$ ./run.py
|
|
|
|
|
|
|
|
"""
|
|
|
|
|
2012-04-12 14:16:12 +00:00
|
|
|
import os
|
2011-09-02 11:15:41 +00:00
|
|
|
import sys
|
|
|
|
|
|
|
|
TESTS_PATH = os.path.dirname(os.path.abspath(__file__))
|
|
|
|
SRC_PATH = os.path.join(TESTS_PATH, '..')
|
|
|
|
|
|
|
|
PYTEST_OPTIONS = [TESTS_PATH]
|
|
|
|
|
|
|
|
# Extend python PATH with openlp source
|
|
|
|
sys.path.insert(0, SRC_PATH)
|
|
|
|
|
|
|
|
# Python testing framework
|
|
|
|
# http://pytest.org
|
|
|
|
import pytest
|
|
|
|
|
|
|
|
|
|
|
|
def main():
|
|
|
|
print 'pytest options:', PYTEST_OPTIONS
|
|
|
|
pytest.main(PYTEST_OPTIONS)
|
|
|
|
|
|
|
|
|
|
|
|
if __name__ == u'__main__':
|
|
|
|
main()
|