mirror of
https://github.com/p2p-ld/nwb-linkml.git
synced 2024-11-12 17:54:29 +00:00
decrease deprecation warnings
This commit is contained in:
parent
24e0b704ff
commit
d77dec5cc0
1 changed files with 11 additions and 1 deletions
|
@ -2,6 +2,7 @@ import pdb
|
|||
import shutil
|
||||
import os
|
||||
import sys
|
||||
import warnings
|
||||
from pathlib import Path
|
||||
|
||||
from typing import Optional, Union, List
|
||||
|
@ -83,7 +84,16 @@ def test_pydantic_provider_core(tmp_output_dir, class_name, test_fields):
|
|||
core = provider.get('core', allow_repo=False)
|
||||
# ensure we didn't get the builtin one
|
||||
assert Path(nwb_linkml.__file__).parent not in Path(core.__file__).parents
|
||||
assert (tmp_output_dir / 'pydantic' / 'core' / version_module_case(core.version) / 'namespace.py').exists()
|
||||
namespace_path = (tmp_output_dir / 'pydantic' / 'core' / version_module_case(core.version) / 'namespace.py')
|
||||
assert namespace_path.exists()
|
||||
assert Path(core.__file__) == namespace_path
|
||||
|
||||
with open(namespace_path, 'r') as nsfile:
|
||||
nsfile_contents = nsfile.read()
|
||||
|
||||
# dk how to debug good on github actions lol
|
||||
warnings.warn(nsfile_contents)
|
||||
|
||||
|
||||
test_class = getattr(core, class_name)
|
||||
assert test_class == provider.get_class('core', class_name)
|
||||
|
|
Loading…
Reference in a new issue