Skip to content

Commit a0f2fc6

Browse files
committed
Make load_model_tests public
1 parent e0815b8 commit a0f2fc6

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
@@ -1785,7 +1785,7 @@ def test(
17851785
if verbosity >= Verbosity.VERBOSE:
17861786
pd.set_option("display.max_columns", None)
17871787

1788-
test_meta = self._load_model_tests(tests=tests, patterns=match_patterns)
1788+
test_meta = self.load_model_tests(tests=tests, patterns=match_patterns)
17891789

17901790
return run_tests(
17911791
model_test_metadata=test_meta,
@@ -2462,7 +2462,7 @@ def lint_models(
24622462
"Linter detected errors in the code. Please fix them before proceeding."
24632463
)
24642464

2465-
def _load_model_tests(
2465+
def load_model_tests(
24662466
self, tests: t.Optional[t.List[str]] = None, patterns: list[str] | None = None
24672467
) -> t.List[ModelTestMetadata]:
24682468
# 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)