-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathconftest.py
More file actions
32 lines (28 loc) · 779 Bytes
/
conftest.py
File metadata and controls
32 lines (28 loc) · 779 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
"""Test set-up and fixtures code."""
import json
import tempfile
from datetime import datetime
from pathlib import Path
from typing import Any
from unittest.mock import MagicMock, Mock, patch
import polars as pl
import pytest
import scipy.sparse as sp
from omegaconf import DictConfig, OmegaConf
@pytest.fixture(autouse=True)
def _setup_doctest_namespace(doctest_namespace: dict[str, Any]):
doctest_namespace.update(
{
"Path": Path,
"sp": sp,
"DictConfig": DictConfig,
"OmegaConf": OmegaConf,
"MagicMock": MagicMock,
"Mock": Mock,
"patch": patch,
"json": json,
"pl": pl,
"datetime": datetime,
"tempfile": tempfile,
}
)