def test_modelize_double_quote_string(): s = "'" assert loads(dumps(modelize(s), dumper=ModelDumper())) == s
def test_modelize_nan(): obj = math.nan assert loads(dumps(modelize(obj), dumper=ModelDumper())) is obj
def test_repr_does_not_contain_wsc(): model = modelize({'foo': 'bar'}) assert 'wsc' not in repr(model)
def test_modelize_objects(obj): assert loads(dumps(modelize(obj), dumper=ModelDumper())) == obj
def test_modelizing_unknown_object_raises_error(): class Foo: ... f = Foo() with pytest.raises(NotImplementedError): modelize(f)