MCPcopy Index your code
hub / github.com/MongoEngine/mongoengine / init_book

Function init_book

benchmarks/test_basic_doc_ops.py:32–39  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

30 Book.drop_collection()
31
32 def init_book():
33 return Book(
34 name="Always be closing",
35 pages=100,
36 tags=["self-help", "sales"],
37 is_published=True,
38 author_email="alec@example.com",
39 )
40
41 print("Doc initialization: %.3fus" % (timeit(init_book, 1000) * 10**6))
42

Callers 2

test_basicFunction · 0.85
create_and_delete_bookFunction · 0.85

Calls 1

BookClass · 0.70

Tested by

no test coverage detected