mirror of
https://github.com/wassname/segpy.git
synced 2026-06-27 18:25:38 +08:00
And here's the test with did the good work leading to the previous commit.
This commit is contained in:
@@ -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))
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user