mirror of
https://github.com/p2p-ld/nwb-linkml.git
synced 2024-11-12 17:54:29 +00:00
don't require warning when at wrong git version
This commit is contained in:
parent
a7b0f8880e
commit
2b530c4b33
2 changed files with 6 additions and 5 deletions
|
@ -5,5 +5,7 @@ from ..fixtures import linkml_schema_bare, linkml_schema, nwb_schema
|
|||
from nwb_linkml.adapters import DatasetAdapter, ClassAdapter
|
||||
|
||||
def test_build_base(nwb_schema):
|
||||
# simplest case, nothing special here
|
||||
dset = DatasetAdapter(cls=nwb_schema.datasets['image'])
|
||||
|
||||
pass
|
|
@ -72,14 +72,13 @@ def test_gitrepo_check(source, commit):
|
|||
repo.clone()
|
||||
assert repo.check()
|
||||
|
||||
# check should fail when repo is at wrong commit
|
||||
# check should not warn but get us to the correct commit
|
||||
assert repo.active_commit == commit
|
||||
repo._git_call('checkout', 'HEAD~10')
|
||||
with pytest.warns(UserWarning, match=".*wrong commit.*"):
|
||||
assert not repo.check()
|
||||
repo.commit = commit
|
||||
assert repo.active_commit == commit
|
||||
assert repo.active_commit != commit
|
||||
# check should pass but switch to proper commit
|
||||
assert repo.check()
|
||||
assert repo.active_commit == commit
|
||||
|
||||
# check should fail on repo namespace mismatch
|
||||
old_repo = repo.namespace.repository
|
||||
|
|
Loading…
Reference in a new issue