diff --git a/test/test_catalog.py b/test/test_catalog.py new file mode 100644 index 0000000..3d372ff --- /dev/null +++ b/test/test_catalog.py @@ -0,0 +1,18 @@ +import unittest + +from hypothesis import given, example +from hypothesis.specifiers import dictionary +from segpy.catalog import CatalogBuilder + + +class TestCatalogBuilder(unittest.TestCase): + + @given(dictionary(int, int)) + def test_constructor(self, mapping): + builder = CatalogBuilder(mapping) + catalog = builder.create() + shared_items = set(mapping.items()) & set(catalog.items()) + self.assertEqual(len(shared_items), len(mapping)) + + +