Skip to content

Commit

Permalink
Fix integration tests skip condition
Browse files Browse the repository at this point in the history
  • Loading branch information
epassaro committed Jun 11, 2020
1 parent 9deb404 commit bb170bf
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 5 additions & 0 deletions tardis/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,11 @@ def tardis_ref_path():
else:
return os.path.expandvars(os.path.expanduser(tardis_ref_path))

@pytest.fixture(scope='session')
def integration_tests():
if not pytest.config.getvalue('integration-tests'):
pytest.skip('integration tests are not included in this run')

from tardis.tests.fixtures.atom_data import *

@pytest.yield_fixture(scope="session")
Expand Down
4 changes: 1 addition & 3 deletions tardis/tests/integration_tests/test_integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,6 @@ def model_quantities(request):
return request.param


@pytest.mark.skipif(not pytest.config.getvalue("integration-tests"),
reason="integration tests are not included in this run")
@pytest.mark.integration
class TestIntegration(object):
"""Slow integration test for various setups present in subdirectories of
Expand All @@ -68,7 +66,7 @@ class TestIntegration(object):

@classmethod
@pytest.fixture(scope="class", autouse=True)
def setup(self, request, reference, data_path, pytestconfig):
def setup(self, request, reference, data_path, pytestconfig, integration_tests):
"""
This method does initial setup of creating configuration and performing
a single run of integration test.
Expand Down

0 comments on commit bb170bf

Please sign in to comment.