Skip to content

Commit ef10d3b

Browse files
committed
Trying concurrent importing of nc libs for ci
1 parent 5f8e051 commit ef10d3b

3 files changed

Lines changed: 4 additions & 13 deletions

File tree

.github/workflows/ci.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ jobs:
113113
shell: bash -l {0}
114114
run: |
115115
export LD_PRELOAD=${{ env.LD_PRELOAD }};
116-
pytest --forked -n auto --cov=satpy satpy/tests --cov-report=xml --cov-report=
116+
pytest -n auto --cov=satpy satpy/tests --cov-report=xml --cov-report=
117117
118118
- name: Upload unittest coverage to Codecov
119119
uses: codecov/codecov-action@v5

continuous_integration/environment.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@ dependencies:
5858
- ephem
5959
- bokeh
6060
- pytest-xdist
61-
- pytest-forked
6261
- pip:
6362
- pytest-lazy-fixtures
6463
- trollsift

satpy/tests/reader_tests/test_netcdf_utils.py

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -66,19 +66,11 @@ def get_test_content(self, filename, filename_info, filetype_info):
6666
raise NotImplementedError("Fake File Handler subclass must implement 'get_test_content'")
6767

6868

69-
@pytest.fixture
70-
def netcdf_file(tmp_path):
69+
@pytest.fixture(scope="session")
70+
def netcdf_file(tmp_path_factory):
7171
"""Create a test NetCDF4 file."""
72-
filename = tmp_path / "test.nc"
73-
from multiprocessing import Process
74-
p = Process(target=_create_netcdf_file, args=(filename, ))
75-
p.start()
76-
p.join()
77-
return filename
78-
79-
80-
def _create_netcdf_file(filename):
8172
from netCDF4 import Dataset
73+
filename = tmp_path_factory.mktemp("data") / "test.nc"
8274
with closing(Dataset(filename, "w")) as nc:
8375
# Create dimensions
8476
nc.createDimension("rows", 10)

0 commit comments

Comments
 (0)