mirror of
https://github.com/python/cpython.git
synced 2025-11-01 18:51:43 +00:00
Array module's buffer interface can now handle empty arrays.
This commit is contained in:
parent
e6e660bde3
commit
01a807db2a
2 changed files with 13 additions and 0 deletions
|
|
@ -601,6 +601,13 @@ class ReTests(unittest.TestCase):
|
|||
self.assertEqual(iter.next().span(), (4, 4))
|
||||
self.assertRaises(StopIteration, iter.next)
|
||||
|
||||
def test_empty_array(self):
|
||||
# SF buf 1647541
|
||||
import array
|
||||
for typecode in 'cbBuhHiIlLfd':
|
||||
a = array.array(typecode)
|
||||
self.assertEqual(re.compile("bla").match(a), None)
|
||||
self.assertEqual(re.compile("").match(a).groups(), ())
|
||||
|
||||
def run_re_tests():
|
||||
from test.re_tests import benchmarks, tests, SUCCEED, FAIL, SYNTAX_ERROR
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue