Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] More Python 3.10 test failures #4100

Closed
vstinner opened this issue Apr 7, 2021 · 7 comments
Closed

[BUG] More Python 3.10 test failures #4100

vstinner opened this issue Apr 7, 2021 · 7 comments

Comments

@vstinner
Copy link
Contributor

vstinner commented Apr 7, 2021

Follow-up of #4046.

(*) Enum formatting:

FAIL: cpdef_enums ()
Doctest: cpdef_enums
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/vstinner/python/master/Lib/doctest.py", line 2205, in runTest
    raise self.failureException(self.format_failure(new.getvalue()))
AssertionError: Failed doctest test for cpdef_enums
  File "/home/vstinner/dev/cython/TEST_TMP/run/c/cpdef_enums/cpdef_enums.cpython-310d-x86_64-linux-gnu.so", line 1, in cpdef_enums

----------------------------------------------------------------------
File "/home/vstinner/dev/cython/TEST_TMP/run/c/cpdef_enums/cpdef_enums.cpython-310d-x86_64-linux-gnu.so", line 39, in cpdef_enums
Failed example:
    str(PyxEnum.TWO)
Expected:
    'PyxEnum.TWO'
Got:
    'TWO'

======================================================================
FAIL: test_formatting_with_enum (test_unicode.UnicodeTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "tests/run/test_unicode.pyx", line 1473, in test_unicode.UnicodeTest.test_formatting_with_enum (test_unicode.c:112176)
    self.assertEqual("%s, %s" % (Str.ABC, Str.ABC),
AssertionError: 'ABC, ABC' != 'Str.ABC, Str.ABC'
- ABC, ABC
+ Str.ABC, Str.ABC

(*) optimised_pow2_inplace:

FAIL: optimised_pow2_inplace (powop)
Doctest: powop.optimised_pow2_inplace
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/vstinner/python/master/Lib/doctest.py", line 2205, in runTest
    raise self.failureException(self.format_failure(new.getvalue()))
AssertionError: Failed doctest test for powop.optimised_pow2_inplace
  File "/home/vstinner/dev/cython/TEST_TMP/run/c/powop/powop.cpython-310d-x86_64-linux-gnu.so", line unknown line number, in optimised_pow2_inplace

----------------------------------------------------------------------
File "/home/vstinner/dev/cython/TEST_TMP/run/c/powop/powop.cpython-310d-x86_64-linux-gnu.so", line ?, in powop.optimised_pow2_inplace
Failed example:
    optimised_pow2_inplace('test')
Expected:
    Traceback (most recent call last):
    TypeError: unsupported operand type(s) for ** or pow(): 'int' and 'str'
Got:
    Traceback (most recent call last):
      File "/home/vstinner/python/master/Lib/doctest.py", line 1337, in __run
        exec(compile(example.source, filename, "single",
      File "<doctest powop.optimised_pow2_inplace[9]>", line 1, in <module>
        optimised_pow2_inplace('test')
      File "tests/run/powop.pyx", line 161, in powop.optimised_pow2_inplace (powop.c:2990)
        x **= n
    TypeError: unsupported operand type(s) for **=: 'int' and 'str'

(*) test_embed:

FAIL: test_embed (__main__.EmbedTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/vstinner/dev/cython/runtests.py", line 1797, in test_embed
    self.assertEqual(0, os.system(
AssertionError: 0 != 512
@vstinner
Copy link
Contributor Author

vstinner commented Apr 7, 2021

There are also many gdb failures like "FAIL: test_updown (Cython.Debugger.Tests.test_libcython_in_gdb.TestUpDown)" but I prefer to ignore them for now (use a different issue for gdb). I don't know if these failures are specific to Python 3.10.

@tirkarthi
Copy link

Enum related changes were made in python/cpython#22392

@vstinner
Copy link
Contributor Author

vstinner commented Apr 7, 2021

Enum formatting: I created #4101 to fix it.

@vstinner
Copy link
Contributor Author

vstinner commented Apr 7, 2021

Enum related changes were made in python/cpython#22392

Right. It's a deliberate change: https://docs.python.org/dev/whatsnew/3.10.html#enum

@vstinner
Copy link
Contributor Author

vstinner commented Apr 7, 2021

(*) optimised_pow2_inplace: I wrote #4103 to fix the test (updated, my PR #4102 didn't work).

@scoder
Copy link
Contributor

scoder commented Apr 14, 2021

Should all be resolved now.

@scoder scoder closed this as completed Apr 14, 2021
@scoder
Copy link
Contributor

scoder commented Apr 14, 2021

(Except for test_embed)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants