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

Method test_read1_bad_args

Lib/test/test_zstd.py:2004–2011  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

2002 self.assertEqual(f.read1(), b"")
2003
2004 def test_read1_bad_args(self):
2005 f = ZstdFile(io.BytesIO(COMPRESSED_100_PLUS_32KB))
2006 f.close()
2007 self.assertRaises(ValueError, f.read1)
2008 with ZstdFile(io.BytesIO(), "w") as f:
2009 self.assertRaises(ValueError, f.read1)
2010 with ZstdFile(io.BytesIO(COMPRESSED_100_PLUS_32KB)) as f:
2011 self.assertRaises(TypeError, f.read1, None)
2012
2013 def test_readinto(self):
2014 arr = array.array("I", range(100))

Callers

nothing calls this directly

Calls 3

closeMethod · 0.95
ZstdFileClass · 0.90
assertRaisesMethod · 0.45

Tested by

no test coverage detected