Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions tests/test_parsers.py
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,32 @@ def test_read_sssom_table(self):
"""Test read SSSOM method to validate import of all columns."""
input_path = os.path.join(test_data_dir, "basic3.tsv")
msdf = parse_sssom_table(input_path)
self.assertIn("comment", set(msdf.df.columns))

# note that the subject_category and object_category get re-organized
self.assertEqual(
[
"subject_id",
"subject_label",
"subject_category",
"predicate_id",
"predicate_modifier",
"object_id",
"object_label",
"object_category",
"mapping_justification",
"subject_source",
"object_source",
"mapping_tool",
"confidence",
"subject_match_field",
"object_match_field",
"match_string",
"comment",
],
list(msdf.df.columns),
)

imported_df = pd.read_csv(input_path, comment="#", sep="\t").fillna("")
imported_df = sort_df_rows_columns(imported_df)
msdf.df = sort_df_rows_columns(msdf.df)
Expand Down
Loading