Skip to content

Commit

Permalink
Add a test of passing a bad object to the metadata builder
Browse files Browse the repository at this point in the history
  • Loading branch information
JeremyMcCormick committed Dec 4, 2024
1 parent 7c057e7 commit c36134e
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tests/test_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,13 @@ def test_ignore_constraints(self) -> None:
msg=f"Table {table.name} has non-primary key constraints defined",
)

def test_bad_schema_type(self) -> None:
"""Test that an error is raised if an object with the wrong type is
passed to the builder.
"""
with self.assertRaises(TypeError):
MetaDataBuilder("not_a_schema")


if __name__ == "__main__":
unittest.main()

0 comments on commit c36134e

Please sign in to comment.