MCPcopy
hub / github.com/psycopg/psycopg / make_record

Method make_record

tests/fix_faker.py:210–216  ·  view source on GitHub ↗
(self, nulls=0)

Source from the content-addressed store, hash-verified

208 self.records = [self.make_record(nulls=0.05) for i in range(nrecords)]
209
210 def make_record(self, nulls=0):
211 if not nulls:
212 return tuple(self.example(spec) for spec in self.schema)
213 else:
214 return tuple(
215 self.make(spec) if random() > nulls else None for spec in self.schema
216 )
217
218 def assert_record(self, got, want):
219 for spec, g, w in zip(self.schema, got, want):

Callers 2

types_names_sqlMethod · 0.95
make_recordsMethod · 0.95

Calls 2

exampleMethod · 0.95
makeMethod · 0.95

Tested by

no test coverage detected