Launch test cases using "setup.py test"

This commit is contained in:
Sunil Mohan Adapa 2014-08-31 14:24:00 +05:30
parent 6d3170ece4
commit 4cc2dc4546
3 changed files with 27 additions and 28 deletions

View File

@ -0,0 +1,26 @@
#!/usr/bin/python
#
# This file is part of Plinth.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# 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 Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
"""
Module initializer for Plinth test cases containing test suite
"""
import unittest
TEST_SUITE = unittest.defaultTestLoader.discover('plinth.tests')

View File

@ -68,6 +68,7 @@ setup(
url='http://freedomboxfoundation.org',
packages=find_packages(),
scripts=['bin/plinth'],
test_suite='plinth.tests.TEST_SUITE',
license='COPYING',
classifiers=[
'Development Status :: 3 - Alpha',

28
test
View File

@ -1,28 +0,0 @@
#!/usr/bin/python
#
# This file is part of Plinth.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# 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 Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
"""
Script to run Plinth test cases
"""
import unittest
if __name__ == '__main__':
test_suite = unittest.defaultTestLoader.discover('plinth.tests')
unittest.TextTestRunner().run(test_suite)