class_docstr: Base class for testing Profet tasks.
class_docstr_tok: ["Base","class","for","testing","Profet","tasks","."]
docstr: Test that the mock_load_data fixture returns real data when the input dir is non-empty,
  and that the means, dtypes, shapes, etc match between the real and fake data.
docstr_tok: ["Test","that","the","mock_load_data","fixture","returns","real","data","when","the","input","dir","is","non-empty",",","and","that","the","means",",","dtypes",",","shapes",",","etc","match","between","the","real","and","fake","data","."]
code: def test_mock_load_data_fixture_when_real_data_available(
      self, tmp_path_factory, mock_load_data
  ):
      """Test that the mock_load_data fixture returns real data when the input dir is non-empty,
      and that the means, dtypes, shapes, etc match between the real and fake data.
      """
      model_config = self.Task.ModelConfig()  # type: ignore
  
      real_input_dir: Path = REAL_PROFET_DATA_DIR
      real_x, real_y, real_c = model_config.load_data(real_input_dir)
  
      fake_input_dir: Path = tmp_path_factory.mktemp("profet_data")
      fake_x, fake_y, fake_c = model_config.load_data(fake_input_dir)
      assert real_x.shape == fake_x.shape
      assert real_y.shape == fake_y.shape
      assert real_c.shape == fake_c.shape
  
      assert real_x.dtype == fake_x.dtype
      assert real_y.dtype == fake_y.dtype
      assert real_c.dtype == fake_c.dtype
  
      assert 0 <= real_x.min() and 0 <= fake_x.min()
      assert real_x.max() <= 1 and fake_x.max() <= 1
  
      min_y, max_y = model_config.y_min, model_config.y_max
      assert min_y <= real_y.min() and min_y <= fake_y.min()
      assert real_y.max() <= max_y and fake_y.max() <= max_y
  
      min_c, max_c = model_config.c_min, model_config.c_max
      assert min_c <= real_c.min() and min_c <= fake_c.min()
      assert real_c.max() <= max_c and fake_c.max() <= max_c
  
imports: from dataclasses import asdict, replace
  from logging import getLogger
  from pathlib import Path
  from typing import ClassVar, Type
  import numpy
  import pytest
  from _pytest.tmpdir import TempPathFactory
  from orion.algo.space import Space
  from typing import List, Union, overload
  from pytest_mock import MockerFixture
  from orion.benchmark.task.profet.profet_task import MetaModelConfig, ProfetTask
  from orion.core.worker.trial import Trial
  from .conftest import REAL_PROFET_DATA_DIR, is_nonempty_dir
label_desc: Use image node_id 3 for calling the ProfetTaskTests obj's underlying member method code with example usage: obj.test_mock_load_data_fixture_when_real_data_available(tmp_path_factory, mock_load_data) without return types