File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed
Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change 55block-level takeup seeding, county precomputation, and CLI flags.
66"""
77
8+ import sys
9+ import types
10+
811import numpy as np
912import pytest
1013import scipy .sparse as sp
1114from types import SimpleNamespace
1215from unittest .mock import patch
1316
17+ # Ensure `l0.calibration` is importable so patch() can traverse the path
18+ # even when the real l0-python package is not installed (e.g. CI).
19+ if "l0" not in sys .modules :
20+ _l0 = types .ModuleType ("l0" )
21+ _l0 .calibration = types .ModuleType ("l0.calibration" )
22+ _l0 .calibration .SparseCalibrationWeights = None
23+ sys .modules ["l0" ] = _l0
24+ sys .modules ["l0.calibration" ] = _l0 .calibration
25+
1426from policyengine_us_data .utils .randomness import seeded_rng
1527from policyengine_us_data .utils .takeup import (
1628 SIMPLE_TAKEUP_VARS ,
You can’t perform that action at this time.
0 commit comments