We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 861b8ed commit fa57eb9Copy full SHA for fa57eb9
tests/test_server_types.py
@@ -1,4 +1,5 @@
1
from labthings.server import types, fields
2
+from labthings.server.types.registry import TypeRegistry, _field_factory
3
import pytest
4
5
from fractions import Fraction
@@ -108,3 +109,12 @@ def test_func(
108
109
"untyped": True,
110
}
111
assert gen_schema.dump(data) == expected_schema.dump(data)
112
+
113
114
+def test_type_registry():
115
+ registry = TypeRegistry()
116
117
+ assert registry.has(str) == True
118
119
+ with pytest.raises(TypeError):
120
+ registry.get(object)
0 commit comments