And here's the test with did the good work leading to the previous commit.

This commit is contained in:
Robert Smallshire
2015-05-07 20:34:13 +02:00
parent 8c484a1ffa
commit f491fe80b1
+18
View File
@@ -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))