Skip to content

Commit

Permalink
setup.py: Sync moban
Browse files Browse the repository at this point in the history
  • Loading branch information
jayvdb committed May 4, 2018
1 parent 4776757 commit afe0be4
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,24 @@


class PyTestCommand(TestCommand):
"""
From https://pytest.org/latest/goodpractices.html
"""
user_options = [('pytest-args=', 'a', 'Arguments to pass to py.test')]

def initialize_options(self):
TestCommand.initialize_options(self)
self.pytest_args = []

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([])
errno = pytest.main(self.pytest_args)
sys.exit(errno)


Expand Down

0 comments on commit afe0be4

Please sign in to comment.