From ea6704ffac667de4e10373273eb75ffbca5d2088 Mon Sep 17 00:00:00 2001 From: Marc-Antoine Schmidt Date: Thu, 5 Dec 2024 15:16:25 -0500 Subject: [PATCH] update Structured --- tests/test_formula.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/test_formula.py b/tests/test_formula.py index 4737e12b..24d5db24 100644 --- a/tests/test_formula.py +++ b/tests/test_formula.py @@ -11,6 +11,11 @@ from formulaic.parser.types import Factor from scipy import sparse as sps +try: + from formulaic.utils.structured import Structured +except ImportError: + from formulaic.parser.types import Structured + import tabmat as tm from tabmat.formula import ( TabmatMaterializer, @@ -1145,5 +1150,5 @@ def test_model_spec_pickleable(self, materializer): pickle.dump(ms.model_spec, o) o.seek(0) ms2 = pickle.load(o) - assert isinstance(ms, formulaic.parser.types.Structured) + assert isinstance(ms, Structured) assert ms2.lhs.formula.root == ["a"]