Skip to content

Commit

Permalink
update test/coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
mavaylon1 committed Oct 17, 2023
1 parent 71fa87c commit d3f99fc
Show file tree
Hide file tree
Showing 6 changed files with 2,089 additions and 15 deletions.
2 changes: 1 addition & 1 deletion src/hdmf/term_set.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def __repr__(self):
re += "Schema Path: %s\n" % self.term_schema_path
return re

Check warning on line 64 in src/hdmf/term_set.py

View check run for this annotation

Codecov / codecov/patch

src/hdmf/term_set.py#L62-L64

Added lines #L62 - L64 were not covered by tests

def _repr_html_(self):
def _repr_html_(self): # pragma: no cover
re = "<p><b>" + "Schema Path: " + "</b>" + self.term_schema_path + "<br>" + "</p>"
re += "<p><b>" + "Sources: " + "</b>" + ", ".join(list(self.sources.keys())) + "</p>"
return re
Expand Down
6 changes: 3 additions & 3 deletions tests/unit/common/test_resources.py
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ def test_add_ref_search_for_file_error(self):

@unittest.skipIf(not LINKML_INSTALLED, "optional LinkML module is not installed")
def test_check_termset_wrapper(self):
terms = TermSet(term_schema_path='tests/unit/example_test_term_set.yaml')
terms = TermSet(name='example', term_schema_path='tests/unit/example_test_term_set.yaml')

# create children and add parent
col1 = VectorData(
Expand All @@ -290,7 +290,7 @@ def test_check_termset_wrapper(self):

@unittest.skipIf(not LINKML_INSTALLED, "optional LinkML module is not installed")
def test_add_ref_termset_data(self):
terms = TermSet(term_schema_path='tests/unit/example_test_term_set.yaml')
terms = TermSet(name='example', term_schema_path='tests/unit/example_test_term_set.yaml')
er = HERD()
em = HERDManagerContainer()
em.link_resources(er)
Expand All @@ -313,7 +313,7 @@ def test_add_ref_termset_data(self):

@unittest.skipIf(not LINKML_INSTALLED, "optional LinkML module is not installed")
def test_add_ref_termset_attr(self):
terms = TermSet(term_schema_path='tests/unit/example_test_term_set.yaml')
terms = TermSet(name='example', term_schema_path='tests/unit/example_test_term_set.yaml')
er = HERD()
em = HERDManagerContainer()
em.link_resources(er)
Expand Down
10 changes: 5 additions & 5 deletions tests/unit/common/test_table.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ def test_constructor_all_columns_are_iterators(self):

@unittest.skipIf(not LINKML_INSTALLED, "optional LinkML module is not installed")
def test_add_col_validate(self):
terms = TermSet(term_schema_path='tests/unit/example_test_term_set.yaml')
terms = TermSet(name='example', term_schema_path='tests/unit/example_test_term_set.yaml')
col1 = VectorData(
name='Species_1',
description='...',
Expand All @@ -139,7 +139,7 @@ def test_add_col_validate(self):

@unittest.skipIf(not LINKML_INSTALLED, "optional LinkML module is not installed")
def test_add_col_validate_bad_data(self):
terms = TermSet(term_schema_path='tests/unit/example_test_term_set.yaml')
terms = TermSet(name='example', term_schema_path='tests/unit/example_test_term_set.yaml')
col1 = VectorData(
name='Species_1',
description='...',
Expand All @@ -154,7 +154,7 @@ def test_add_col_validate_bad_data(self):

@unittest.skipIf(not LINKML_INSTALLED, "optional LinkML module is not installed")
def test_add_row_validate(self):
terms = TermSet(term_schema_path='tests/unit/example_test_term_set.yaml')
terms = TermSet(name='example', term_schema_path='tests/unit/example_test_term_set.yaml')
col1 = VectorData(
name='Species_1',
description='...',
Expand All @@ -176,7 +176,7 @@ def test_add_row_validate(self):

@unittest.skipIf(not LINKML_INSTALLED, "optional LinkML module is not installed")
def test_add_row_validate_bad_data_one_col(self):
terms = TermSet(term_schema_path='tests/unit/example_test_term_set.yaml')
terms = TermSet(name='example', term_schema_path='tests/unit/example_test_term_set.yaml')
col1 = VectorData(
name='Species_1',
description='...',
Expand All @@ -193,7 +193,7 @@ def test_add_row_validate_bad_data_one_col(self):

@unittest.skipIf(not LINKML_INSTALLED, "optional LinkML module is not installed")
def test_add_row_validate_bad_data_all_col(self):
terms = TermSet(term_schema_path='tests/unit/example_test_term_set.yaml')
terms = TermSet(name='example', term_schema_path='tests/unit/example_test_term_set.yaml')
col1 = VectorData(
name='Species_1',
description='...',
Expand Down
Loading

0 comments on commit d3f99fc

Please sign in to comment.