MCPcopy Index your code
hub / github.com/python/cpython / create_file

Method create_file

Lib/test/audiotests.py:57–66  ·  view source on GitHub ↗
(self, testfile)

Source from the content-addressed store, hash-verified

55 readonly = False
56
57 def create_file(self, testfile):
58 if self.readonly:
59 self.skipTest('Read only file format')
60 f = self.fout = self.module.open(testfile, 'wb')
61 f.setnchannels(self.nchannels)
62 f.setsampwidth(self.sampwidth)
63 f.setframerate(self.framerate)
64 f.setcomptype(self.comptype, self.compname)
65 f.setformat(self.format)
66 return f
67
68 def check_file(self, testfile, nframes, frames):
69 with self.module.open(testfile, 'rb') as f:

Callers 12

test_write_paramsMethod · 0.95
test_writeMethod · 0.95
test_write_bytearrayMethod · 0.95
test_write_arrayMethod · 0.95
test_write_memoryviewMethod · 0.95
test_multiple_writesMethod · 0.95
test_overflowed_writeMethod · 0.95
test_unseekable_readMethod · 0.95
test_unseekable_writeMethod · 0.95

Calls 7

skipTestMethod · 0.80
setnchannelsMethod · 0.80
setsampwidthMethod · 0.80
setframerateMethod · 0.80
setcomptypeMethod · 0.80
setformatMethod · 0.80
openMethod · 0.45

Tested by

no test coverage detected