irods / python-irodsclient

A Python API for iRODS
Other
62 stars 73 forks source link

An import in the tests doesn’t seem to work as intended #613

Closed musicinmybrain closed 3 months ago

musicinmybrain commented 3 months ago

I’m considering packaging this in Fedora Linux. I don’t have the ability to test this with a real iRODS grid, so I’m using an import-only “smoke test” as a sanity check. I found that irods.test.resource_test fails to import, at least on Python 3.13, with an ImportError like the following:

  File "/builddir/build/BUILD/python-python-irodsclient-2.1.0-build/BUILDROOT/usr/lib/python3.13/site-packages/irods/test/resource_test.py", line 14, in TestResource
    from helpers import create_simple_resc_hierarchy, create_simple_resc
ModuleNotFoundError: No module named 'helpers'

Maybe this works on older Python interpreters – I’m not sure.

This can be fixed by https://github.com/irods/python-irodsclient/pull/612.

trel commented 3 months ago

In case you'd like to try 'more' testing... you can stand up a dockerized iRODS grid with https://github.com/irods/irods_demo

Then.. docker compose up irods-catalog-provider will stand up the iRODS server and database.

If you'd like to open the iRODS port on irods-catalog-provider to the outside... you'd have to add:

        ports:
            - "1247:1247"
alanking commented 3 months ago

Fix has been merged. Thanks, @musicinmybrain