コード例 #1
0
ファイル: conftest.py プロジェクト: kmacdonald-stsci/jwst
def pool_path_fixture(metafunc):
    """Define the pool_path fixture

    This is needed to build a list during test collection for the test
    `jwst.regtest.test_associations_sdp_pools.test_against_standard`

    Parameters
    ----------
    metafunc: pytest.Metafunc
        The pytest test generation inspection object.
    """
    # If doing "big data" regressions has not been requested,
    # do not invoke any tests.
    if not metafunc.config.getoption('bigdata'):
        skip = pytest.skip('For "pool_path" fixtures, option "--bigdata" was not specified.')
        metafunc.parametrize('pool_path', skip)
        return

    try:
        inputs_root = metafunc.config.getini('inputs_root')[0]
        results_root = metafunc.config.getini('results_root')[0]
        env = metafunc.config.getoption('env')
    except IndexError:
        inputs_root = "jwst-pipeline"
        results_root = "jwst-pipeline-results"
        env = "dev"

    pools = SDPPoolsSource(env=env, inputs_root=inputs_root, results_root=results_root)

    try:
        pool_paths = pools.pool_paths
    except Exception:
        pool_paths = []

    ids = [
        Path(pool_path).stem
        for pool_path in pool_paths
    ]

    metafunc.parametrize('pool_path', pool_paths, ids=ids)
コード例 #2
0
ファイル: conftest.py プロジェクト: kmacdonald-stsci/jwst
def _sdpdata_fixture_implementation(artifactory_repos, envopt, request):
    """Provides the RemoteResource class"""
    inputs_root, results_root = artifactory_repos
    return SDPPoolsSource(env=envopt, inputs_root=inputs_root,
                          results_root=results_root)