You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
on Debian, we are currently migrating to Python 3.9. With the released version, we get now errors when running the tests:
============================= test session starts ==============================
platform linux -- Python 3.9.0+, pytest-4.6.11, py-1.9.0, pluggy-0.13.0
rootdir: /tmp/autopkgtest-lxc.dhe2dv4q/downtmp/autopkgtest_tmp
plugins: openfiles-0.5.0, arraydiff-0.3, hypothesis-5.41.2, remotedata-0.3.2,
asdf-2.7.1, astropy-header-0.1.2, doctestplus-0.7.0, filter-subpackage-0.1.1,
cov-2.8.1
collected 462 items / 2 errors / 460 selected
==================================== ERRORS ====================================
_______________ ERROR collecting tags/core/tests/test_ndarray.py _______________
/usr/lib/python3/dist-packages/asdf/tags/core/tests/test_ndarray.py:25: in <module>
TEST_DATA_PATH = helpers.get_test_data_path('', module=test_data)
/usr/lib/python3/dist-packages/asdf/tests/helpers.py:68: in get_test_data_path
with resources.path(module, name) as path:
/usr/lib/python3.9/contextlib.py:117: in __enter__
return next(self.gen)
/usr/lib/python3.9/importlib/resources.py:175: in _path_from_reader
opener_reader = reader.open_resource(norm_resource)
<frozen importlib._bootstrap_external>:995: in open_resource
???
E IsADirectoryError: [Errno 21] Is a directory:
'/usr/lib/python3/dist-packages/asdf/tags/core/tests/data'
_____________________ ERROR collecting tests/test_types.py _____________________
/usr/lib/python3/dist-packages/asdf/tests/test_types.py:20: in <module>
TEST_DATA_PATH = str(helpers.get_test_data_path(''))
/usr/lib/python3/dist-packages/asdf/tests/helpers.py:68: in get_test_data_path
with resources.path(module, name) as path:
/usr/lib/python3.9/contextlib.py:117: in __enter__
return next(self.gen)
/usr/lib/python3.9/importlib/resources.py:175: in _path_from_reader
opener_reader = reader.open_resource(norm_resource)
<frozen importlib._bootstrap_external>:995: in open_resource
???
E IsADirectoryError: [Errno 21] Is a directory:
'/usr/lib/python3/dist-packages/asdf/tests/data'
!!!!!!!!!!!!!!!!!!! Interrupted: 2 errors during collection !!!!!!!!!!!!!!!!!!!!
=========================== 2 error in 1.59 seconds ============================
This was reported as bug Debian#975529. With Python 3.8, the tests run fine. Do you have a patch available that fixes this? Or do you plan a new version soon?
The text was updated successfully, but these errors were encountered:
I ran our test suite on a Travis linux container with Python 3.9 and didn't see any failures. Here's the result when running the tests out of the repo clone:
I don't know why Debian behaves differently, but looking at the documentation for importlib.resources.path it seems clear that we're misusing it by asking for a directory.
I suspect that helpers.get_test_data_path should just be removed. Or just return a path instead of returning the opened file in a with context manager.
Hi,
on Debian, we are currently migrating to Python 3.9. With the released version, we get now errors when running the tests:
This was reported as bug Debian#975529. With Python 3.8, the tests run fine. Do you have a patch available that fixes this? Or do you plan a new version soon?
The text was updated successfully, but these errors were encountered: