Skip to content
Snippets Groups Projects
Commit f74de303 authored by leufen1's avatar leufen1
Browse files

use mocking for cpu count during tests

parent 7df2c069
No related branches found
No related tags found
3 merge requests!226Develop,!225Resolve "release v1.2.0",!195Resolve "Parallel station check"
Pipeline #52946 passed
import logging
import pytest
import mock
from mlair.data_handler import DefaultDataHandler, DataCollection, AbstractDataHandler
from mlair.helpers.datastore import NameNotFoundInScope
......@@ -34,7 +35,8 @@ class TestPreProcessing:
yield pre
RunEnvironment().__del__()
def test_init(self, caplog):
@mock.patch("multiprocessing.cpu_count", return_value=1)
def test_init(self, mock_cpu, caplog):
ExperimentSetup(stations=['DEBW107', 'DEBY081', 'DEBW013', 'DEBW076', 'DEBW087'],
statistics_per_var={'o3': 'dma8eu', 'temp': 'maximum'})
caplog.clear()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment