mirror of
https://github.com/python/cpython.git
synced 2025-09-24 09:23:02 +00:00
Issue #10212: Support new buffer interface for struct.unpack and
cStringIO
This commit is contained in:
parent
1d108bc714
commit
9795ca44fb
5 changed files with 63 additions and 35 deletions
|
@ -20,7 +20,6 @@ class TestGenericStringIO(unittest.TestCase):
|
|||
constructor = str
|
||||
|
||||
def setUp(self):
|
||||
self._line = self.constructor(self._line)
|
||||
self._lines = self.constructor((self._line + '\n') * 5)
|
||||
self._fp = self.MODULE.StringIO(self._lines)
|
||||
|
||||
|
@ -210,12 +209,16 @@ class TestBufferStringIO(TestStringIO):
|
|||
class TestBuffercStringIO(TestcStringIO):
|
||||
constructor = buffer
|
||||
|
||||
class TestMemoryviewcStringIO(TestcStringIO):
|
||||
constructor = memoryview
|
||||
|
||||
|
||||
def test_main():
|
||||
test_support.run_unittest(TestStringIO, TestcStringIO)
|
||||
with test_support.check_py3k_warnings(("buffer.. not supported",
|
||||
DeprecationWarning)):
|
||||
test_support.run_unittest(TestBufferStringIO, TestBuffercStringIO)
|
||||
test_support.run_unittest(TestMemoryviewcStringIO)
|
||||
|
||||
if __name__ == '__main__':
|
||||
test_main()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue