Skip to content

Commit

Permalink
setup: use py.test for 'python setup.py test'
Browse files Browse the repository at this point in the history
  • Loading branch information
jtriley committed Feb 11, 2014
1 parent 00cbfdd commit 376a738
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pytest.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[pytest]
addopts = starcluster
15 changes: 15 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,24 @@

try:
from setuptools import setup, find_packages
from setuptools.command.test import test as TestCommand

class PyTest(TestCommand):
def finalize_options(self):
TestCommand.finalize_options(self)
self.test_args = []
self.test_suite = True

def run_tests(self):
#import here, cause outside the eggs aren't loaded
import pytest
errno = pytest.main(self.test_args)
sys.exit(errno)

console_scripts = ['starcluster = starcluster.cli:main']
extra = dict(test_suite="starcluster.tests",
tests_require="pytest",
cmdclass={"test": PyTest},
install_requires=["paramiko>=1.12.1", "boto>=2.23.0",
"workerpool>=0.9.2", "Jinja2>=2.7",
"decorator>=3.4.0", "iptools>=0.6.1",
Expand Down

0 comments on commit 376a738

Please sign in to comment.