MCPcopy Create free account
hub / github.com/pytorch/pytorch / setUp

Method setUp

caffe2/python/db_test.py:14–23  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

12
13class TestDB(unittest.TestCase):
14 def setUp(self):
15 handle, self.file_name = tempfile.mkstemp()
16 os.close(handle)
17 self.data = [
18 (
19 "key{}".format(i).encode("ascii"),
20 "value{}".format(i).encode("ascii")
21 )
22 for i in range(1, 10)
23 ]
24
25 def testSimple(self):
26 db = workspace.C.create_db(

Callers

nothing calls this directly

Calls 4

encodeMethod · 0.80
rangeFunction · 0.50
closeMethod · 0.45
formatMethod · 0.45

Tested by

no test coverage detected