Skip to content

Commit d2ca392

Browse files
committed
Reorganising tests in the schemaview test file so that all import and import merge-related tests are at the top of the file.
1 parent 346f415 commit d2ca392

File tree

3 files changed

+756
-757
lines changed

3 files changed

+756
-757
lines changed

linkml_runtime/utils/introspection.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
1+
from __future__ import annotations
2+
13
import sys
24
from functools import lru_cache
35
from pathlib import Path
46
from types import ModuleType
5-
from typing import Union
67

78
from linkml_runtime.linkml_model import ClassDefinition
89
from linkml_runtime.utils.distroutils import get_schema_string
910
from linkml_runtime.utils.schemaview import SchemaView
1011
from linkml_runtime.utils.yamlutils import YAMLRoot
1112

12-
1313
SCHEMA_PATH_VAR = "schema_path"
1414

1515

16-
def package_schema_path(package: Union[str, ModuleType]) -> Path:
16+
def package_schema_path(package: str | ModuleType) -> Path:
1717
if isinstance(package, str):
1818
package = sys.modules[package]
1919
if SCHEMA_PATH_VAR in vars(package):

tests/test_utils/input/imports/main.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ classes:
1212
attributes:
1313
value:
1414
range: string
15-
ifabsent: "Main"
15+
ifabsent: "Main"

0 commit comments

Comments
 (0)