Support running ./setup.py test

setuptools can run tests. Use nose2 to run the tests.
If it is not installed on your system, it is downloaded
and temporarily used.
This commit is contained in:
Bastian Germann 2018-10-06 22:49:13 +02:00
parent 6edd85146d
commit 9f6b03047b
2 changed files with 2 additions and 2 deletions

View File

@ -57,8 +57,7 @@ class Registry(object):
registry.functions_list = {}
registry.working_flags = {}
# Allow the tests to remove Registry entries but not the live system
registry.running_under_test = 'nose' in sys.argv[0]
registry.running_under_test = 'pytest' in sys.argv[0]
registry.running_under_test = 'nose' in sys.argv[0] or 'pytest' in sys.argv[0]
registry.initialising = True
return registry

View File

@ -201,5 +201,6 @@ using a computer and a data projector.""",
'xdg': ['pyxdg']
},
tests_require=['nose2', 'PyICU', 'pylint'],
test_suite='nose2.collector.collector',
entry_points={'gui_scripts': ['openlp = openlp.__main__:start']}
)