MCPcopy Index your code
hub / github.com/RustPython/RustPython / check_file

Method check_file

Lib/test/audiotests.py:63–69  ·  view source on GitHub ↗
(self, testfile, nframes, frames)

Source from the content-addressed store, hash-verified

61 return f
62
63 def check_file(self, testfile, nframes, frames):
64 with self.module.open(testfile, 'rb') as f:
65 self.assertEqual(f.getnchannels(), self.nchannels)
66 self.assertEqual(f.getsampwidth(), self.sampwidth)
67 self.assertEqual(f.getframerate(), self.framerate)
68 self.assertEqual(f.getnframes(), nframes)
69 self.assertEqual(f.readframes(nframes), frames)
70
71 def test_write_params(self):
72 f = self.create_file(TESTFN)

Callers 11

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

readframesMethod · 0.80
openMethod · 0.45
assertEqualMethod · 0.45
getnchannelsMethod · 0.45
getsampwidthMethod · 0.45
getframerateMethod · 0.45
getnframesMethod · 0.45

Tested by

no test coverage detected