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

ERROR: test/test_job_archive_interface.py - missing test plan #370

Open
garlick opened this issue Aug 15, 2023 · 4 comments
Open

ERROR: test/test_job_archive_interface.py - missing test plan #370

garlick opened this issue Aug 15, 2023 · 4 comments

Comments

@garlick
Copy link
Member

garlick commented Aug 15, 2023

Problem: as noted here, one of the unit tests is failing for me:

Traceback (most recent call last):
  File "/nfshome/garlick/proj/flux-accounting/src/bindings/python/fluxacct/accounting/./test/test_job_archive_interface.py", line 20, in <module>
    from fluxacct.accounting import job_archive_interface as jobs
  File "/nfshome/garlick/proj/flux-accounting/src/bindings/python/fluxacct/accounting/job_archive_interface.py", line 18, in <module>
    from flux.resource import ResourceSet
ModuleNotFoundError: No module named 'flux'
ERROR: test/test_job_archive_interface.py - missing test plan
ERROR: test/test_job_archive_interface.py - exited with status 1

This is a debian bullseye system with flux-core installed as a system package.

@garlick
Copy link
Member Author

garlick commented Aug 15, 2023

One note: if I run flux make check, the tests work, so perhaps something environmental with the unit tests.

@cmoussa1
Copy link
Member

I wonder if the flux-accounting Python bindings is doing something incorrectly with importing the flux Python module? Sorry, I feel like I am no help here 😩 FWIW, I think the Makefile.am for flux-accounting is the same as flux-sched's fluxion Makefile.am:

SUBDIRS = accounting

install-data-hook:
	$(AM_V_at)echo Linking python modules in non-standard location... && \
	  $(INSTALL) -d -m 0755 "$(DESTDIR)$(fluxpylinkdir)" && \
	  target=$(fluxpydir) && \
	  f=$${target##*/} && \
	  cd "$(DESTDIR)$(fluxpylinkdir)" && \
	  rm -f $$f && \
	  $(LN_S) $$target .

uninstall-local:
	$(AM_V_at)target=$(fluxpydir) && f=$${target##*/} && \
	  echo "Removing $(fluxpylinkdir)/$$f" && \
	  rm -rf $(fluxpylinkdir)/$$f

@garlick
Copy link
Member Author

garlick commented Aug 16, 2023

I was thinking maybe the python environment for unit tests would be the right place to start looking:

AM_TESTS_ENVIRONMENT = \
        export PYTHONPATH="$(abs_top_srcdir)/src/bindings/python/:$(abs_top_srcdir)/t/pycotap:$(PYTHON_SITE_PKG):$$PYTHONPATH";\
        export PYTHON="${PYTHON}";

https://github.com/flux-framework/flux-accounting/blob/master/src/bindings/python/fluxacct/accounting/Makefile.am#L28

But that looks ok to me. I must be missing something.

@cmoussa1
Copy link
Member

I've since moved the Python unit tests to the t/ directory, and they now run alongside the sharness tests. Not sure if that might have fixed this missing test plan error

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

No branches or pull requests

2 participants