forked from openlp/openlp
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:
parent
6edd85146d
commit
9f6b03047b
@ -57,8 +57,7 @@ class Registry(object):
|
|||||||
registry.functions_list = {}
|
registry.functions_list = {}
|
||||||
registry.working_flags = {}
|
registry.working_flags = {}
|
||||||
# Allow the tests to remove Registry entries but not the live system
|
# 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 = 'nose' in sys.argv[0] or 'pytest' in sys.argv[0]
|
||||||
registry.running_under_test = 'pytest' in sys.argv[0]
|
|
||||||
registry.initialising = True
|
registry.initialising = True
|
||||||
return registry
|
return registry
|
||||||
|
|
||||||
|
1
setup.py
1
setup.py
@ -201,5 +201,6 @@ using a computer and a data projector.""",
|
|||||||
'xdg': ['pyxdg']
|
'xdg': ['pyxdg']
|
||||||
},
|
},
|
||||||
tests_require=['nose2', 'PyICU', 'pylint'],
|
tests_require=['nose2', 'PyICU', 'pylint'],
|
||||||
|
test_suite='nose2.collector.collector',
|
||||||
entry_points={'gui_scripts': ['openlp = openlp.__main__:start']}
|
entry_points={'gui_scripts': ['openlp = openlp.__main__:start']}
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user