fix tests for PyPy3

Open
#5 · Created  · Last updated

Description

Here are two commits fixing the PyPy3 comparability, issues shown here.

  • fix test_empty_array

    As an optimization, PyPy sets empty array.array to use a NULL buffer pointer, while CPython uses empty buffer (but not NULL). Add a very specially crafted fix for PyPy3

  • fix test_issue_18468

    When using the small subclass classes to test correctness of split results, there are difference between CPython and PyPy3: - CPython returns always the base class (for example str instead of StrSubclass) - PyPy3 returns the same class, so we get an StrSubclass

    The fix was to relax the equals type to check that it is a subclass.

I hope those commits are acceptable for you, and I will gladly change the commits as you see fit.

 

0 attachments

0 comments

Loading commits...