Skip to content

Commit 3d4f9f0

Browse files
committed
Make load_model_tests public
1 parent 816d722 commit 3d4f9f0

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

sqlmesh/core/context.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1780,7 +1780,7 @@ def test(
17801780
if verbosity >= Verbosity.VERBOSE:
17811781
pd.set_option("display.max_columns", None)
17821782

1783-
test_meta = self._load_model_tests(tests=tests, patterns=match_patterns)
1783+
test_meta = self.load_model_tests(tests=tests, patterns=match_patterns)
17841784

17851785
return run_tests(
17861786
model_test_metadata=test_meta,
@@ -2457,7 +2457,7 @@ def lint_models(
24572457
"Linter detected errors in the code. Please fix them before proceeding."
24582458
)
24592459

2460-
def _load_model_tests(
2460+
def load_model_tests(
24612461
self, tests: t.Optional[t.List[str]] = None, patterns: list[str] | None = None
24622462
) -> t.List[ModelTestMetadata]:
24632463
# If a set of tests is provided, use a single loader to load them

sqlmesh/magics.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ def test(self, context: Context, line: str, test_def_raw: t.Optional[str] = None
272272
if not args.test_name and not args.ls:
273273
raise MagicError("Must provide either test name or `--ls` to list tests")
274274

275-
test_meta = context._load_model_tests()
275+
test_meta = context.load_model_tests()
276276

277277
tests: t.Dict[str, t.Dict[str, ModelTestMetadata]] = defaultdict(dict)
278278
for model_test_metadata in test_meta:

0 commit comments

Comments
 (0)