fonttools / skia-pathops

Python bindings for the Skia library's Path Ops
https://skia.org/docs/dev/present/pathops/
BSD 3-Clause "New" or "Revised" License
47 stars 14 forks source link

pytest 6 + pytest-cython cause test failure #36

Open alerque opened 4 years ago

alerque commented 4 years ago

At some point the Arch Linux package for 0.4.1 stopped building because the tests started failing. I just bumped the packages to 0.5.1, but tests are still failing.

I believe this has to do with the dependencies being used to test being newer than something this project is actually using. Here is the related output including versions of test dependencies and the deprecation notes that it errors out on:

==> Starting check()...
============================================================================================== test session starts ==============================================================================================
platform linux -- Python 3.8.5, pytest-6.1.0, py-1.9.0, pluggy-0.13.1 -- /usr/bin/python
cachedir: .pytest_cache
Using --randomly-seed=867315760
rootdir: /home/caleb/projects/aur/python-skia-pathops/src/skia-pathops-0.5.1, configfile: tox.ini, testpaths: src/python/pathops, tests
plugins: randomly-3.4.1, forked-1.3.0, cov-2.10.1, xdist-2.1.0, cython-0.1.0
collected 43 items / 1 error / 42 selected

==================================================================================================== ERRORS =====================================================================================================
________________________________________________________________________________ ERROR collecting src/python/pathops/__init__.py ________________________________________________________________________________
Direct construction of DoctestModule has been deprecated, please use DoctestModule.from_parent.
See https://docs.pytest.org/en/stable/deprecations.html#node-construction-changed-to-node-from-parent for more details.
============================================================================================ short test summary info ============================================================================================
ERROR src/python/pathops/__init__.py
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
=============================================================================================== 1 error in 0.12s ================================================================================================
==> ERROR: A failure occurred in check().
anthrotype commented 4 years ago

Thanks. I noticed that as well. For the time being you can try using pytest < 6, I think that will work.

The pytest-cython module is using a deprecated pytest API. It has only been fixed very recently https://github.com/lgpage/pytest-cython/pull/5

I hope that they publish a new release with that fix soon.