mirror of
https://github.com/wassname/segpy.git
synced 2026-07-22 13:00:40 +08:00
19 lines
468 B
Python
19 lines
468 B
Python
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))
|
|
|
|
|
|
|