diff --git a/scripts/check_dependencies.py b/scripts/check_dependencies.py index 242b28477..83ab4cc52 100755 --- a/scripts/check_dependencies.py +++ b/scripts/check_dependencies.py @@ -33,12 +33,6 @@ import os import sys from distutils.version import LooseVersion -# If we try to import uno before nose this will create a warning. Just try to import nose first to suppress the warning. -try: - import nose -except ImportError: - nose = None - IS_WIN = sys.platform.startswith('win') IS_LIN = sys.platform.startswith('lin') IS_MAC = sys.platform.startswith('dar') @@ -106,7 +100,7 @@ MODULES = [ OPTIONAL_MODULES = [ ('mysql.connector', '(MySQL support)', True), ('psycopg2', '(PostgreSQL support)', True), - ('nose', '(testing framework)', True), + ('nose2', '(testing framework)', True), ('mock', '(testing module)', sys.version_info[1] < 3), ('jenkins', '(access jenkins api - package name: jenkins-webapi)', True), ('pysword', '(import SWORD bibles)', True), diff --git a/tests/README.txt b/tests/README.txt index 493b5ccb5..926e49043 100644 --- a/tests/README.txt +++ b/tests/README.txt @@ -8,10 +8,10 @@ Prerequisites In order to run the unit tests, you will need the following Python packages/libraries installed: - - Mock - - Nose + - nose2 + - pylint -On Ubuntu you can simple install the python-mock and python-nose packages. Most other distributions will also have these +On Ubuntu you can simple install the python-nose2 and pylint packages. Most other distributions will also have these packages. On Windows and Mac OS X you will need to use ``pip`` or ``easy_install`` to install these packages. Running the Tests @@ -19,16 +19,16 @@ Running the Tests To run the tests, navigate to the root directory of the OpenLP project, and then run the following command:: - nosetests -v tests + nose2 -v tests Or, to run only the functional tests, run the following command:: - nosetests -v tests/functional + nose2 -v tests.functional Or, to run only a particular test suite within a file, run the following command:: - nosetests -v tests/functional/test_applocation.py + nose2 -v tests.functional.openlp_core.test_app Finally, to only run a particular test, run the following command:: - nosetests -v tests/functional/test_applocation.py:TestAppLocation.get_frozen_path_test + nose2 -v tests.functional.openlp_core.test_app.TestOpenLP.test_process_events