Skip to content

Commit

Permalink
Add runner script as setup.py entry_point.
Browse files Browse the repository at this point in the history
  • Loading branch information
Karan Desai committed Jul 11, 2016
1 parent ed5f3f7 commit d5d7532
Show file tree
Hide file tree
Showing 14 changed files with 11 additions and 7 deletions.
4 changes: 4 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,10 @@
hook_func = 'astropy.utils.release:' + '_'.join(hook)
entry_points[hook_ep] = ['%s = %s' % (hook_name, hook_func)]

entry_points['console_scripts'] = [
'tardis_test_runner = tardis.tests.integration_tests.runner:run_tests'
]

#from Cython.Build import cythonize
#package_info['ext_modules'] = cythonize(package_info['ext_modules'])
# Include all .c files, recursively, including those generated by
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
import pytest

from tardis import __githash__ as tardis_githash
from tardis.tests.tests_slow.report import DokuReport
from tardis.tests.tests_slow.plot_helpers import PlotUploader
from tardis.tests.integration_tests.report import DokuReport
from tardis.tests.integration_tests.plot_helpers import PlotUploader


def pytest_configure(config):
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
help="Path to atomic dataset.")


if __name__ == "__main__":
def run_tests():
args = parser.parse_args()
while True:
gh_request = requests.get(
Expand All @@ -34,7 +34,7 @@

subprocess.call([
"python", "setup.py", "test",
"--test-path=tardis/tests/tests_slow/test_integration.py", "--args",
"--test-path=tardis/tests/integration_tests/test_integration.py", "--args",
"-rs --integration-tests={0} --atomic-dataset={1} --remote-data".format(
args.yaml_filepath, args.atomic_dataset
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
reason="integration tests are not included in this run")
class TestIntegration(object):
"""Slow integration test for various setups present in subdirectories of
``tardis/tests/tests_slow``.
``tardis/tests/integration_tests``.
"""

@classmethod
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions tardis/tests/setup_package.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ def get_package_data():
return {
_ASTROPY_PACKAGE_NAME_ + '.tests': ['coveragerc', 'data/*.h5',
'data/*.dat', 'data/*.npy',
'tests_slow/*/*.yml',
'tests_slow/*/*.dat']}
'integration_tests/*/*.yml',
'integration_tests/*/*.dat']}

0 comments on commit d5d7532

Please sign in to comment.