MCPcopy Create free account
hub / github.com/apache/fory / create_foo

Function create_foo

python/pyfory/tests/test_cross_language.py:119–126  ·  view source on GitHub ↗
(foo_cls=Foo, bar_cls=Bar)

Source from the content-addressed store, hash-verified

117
118
119def create_foo(foo_cls=Foo, bar_cls=Bar):
120 obj = foo_cls.__new__(foo_cls)
121 obj.f1 = 1
122 obj.f2 = "str"
123 obj.f3 = ["str1", None, "str2"]
124 obj.f4 = {"k" + str(i): i for i in range(1, 7)}
125 obj.f5 = create_bar(bar_cls)
126 return obj
127
128
129def create_bar(cls):

Callers 3

test_record_batchFunction · 0.70

Calls 1

create_barFunction · 0.70

Tested by

no test coverage detected