Commit fd7e660c authored by Antoine Pitrou's avatar Antoine Pitrou

Add test for fix of issue #1730114.

parent 8e24d035
......@@ -4,6 +4,7 @@ import unittest
import StringIO
import cStringIO
import types
import array
from test import test_support
......@@ -127,6 +128,13 @@ class TestStringIO(TestGenericStringIO):
class TestcStringIO(TestGenericStringIO):
MODULE = cStringIO
def test_array_support(self):
# Issue
a = array.array('B', [0,1,2])
f = self.MODULE.StringIO(a)
self.assertEqual(f.getvalue(), '\x00\x01\x02')
import sys
if sys.platform.startswith('java'):
# Jython doesn't have a buffer object, so we just do a useless
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment