File size: 884 Bytes
8032ef4
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
"""Some registered sources have no data/ folder in this checkout: a release tag leaves out the
sources on main that it does not release, and a source held off main (sejm_interpellations,
kultura_bez_barier_pl) has none on main either. The test modules that check those sources' shipped files skip there;
where the folders are, they run."""
import pytest

import make_docs

SHIPPED_FILE_TESTS = {
    "test_kultura_bez_barier_contribution.py": "kultura_bez_barier_pl",
    "test_licence_basis_kultura_bez_barier_pl.py": "kultura_bez_barier_pl",
    "test_sejm_interpellations_contract.py": "sejm_interpellations",
}


def pytest_collection_modifyitems(items):
    for item in items:
        source = SHIPPED_FILE_TESTS.get(item.path.name)
        if source and make_docs.held_out(source):
            item.add_marker(pytest.mark.skip(reason=f"data/{source}/ is not in this checkout"))