From d3191aca7d5a1989478e60cac934929bacead267 Mon Sep 17 00:00:00 2001 From: IanCa Date: Tue, 7 May 2024 14:34:22 -0500 Subject: [PATCH] slightly improve ontology test --- tests/schema/test_ontology_util.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tests/schema/test_ontology_util.py b/tests/schema/test_ontology_util.py index 6a1c51b2..224902dd 100644 --- a/tests/schema/test_ontology_util.py +++ b/tests/schema/test_ontology_util.py @@ -145,7 +145,6 @@ def test_convert_df_to_omn(self): dataframes = load_schema_version("8.3.0").get_as_dataframes() omn_version = convert_df_to_omn(dataframes) - # todo ian: add another check here for hed ID's being located(it's okay if it's halffassed) # make these more robust, for now just verify it's somewhere in the result for df_name, df in dataframes.items(): if df_name == constants.STRUCT_KEY: @@ -155,3 +154,10 @@ def test_convert_df_to_omn(self): error = f"Label '{label}' from dataframe '{df_name}' was not found in the OMN output." label_key = f'rdfs:label "{label}"' self.assertIn(label_key, omn_version, error) + + for hed_id in df[constants.hed_id]: + if df_name == constants.STRUCT_KEY: + continue # Not implemented yet + base_id = f": hed:{hed_id}" + error = f"HedId '{base_id}' from dataframe '{df_name}' was not found in the OMN output." + self.assertIn(base_id, omn_version, error)