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

SPDHG tests running in an environment without astra #2025

Closed
MargaretDuff opened this issue Jan 6, 2025 · 0 comments · Fixed by #2026
Closed

SPDHG tests running in an environment without astra #2025

MargaretDuff opened this issue Jan 6, 2025 · 0 comments · Fixed by #2026
Assignees
Labels
bug Something isn't working

Comments

@MargaretDuff
Copy link
Member

MargaretDuff commented Jan 6, 2025

Description

In an environment without astra:

======================================================================
ERROR: test_spdhg_set_norms (test_algorithms.TestSPDHG.test_spdhg_set_norms)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "C:\Users\gemst\GitHub\CIL\Wrappers\Python\test\test_algorithms.py", line 1217, in setUp
    Aop = ProjectionOperator(ig, ag, dev)
          ^^^^^^^^^^^^^^^^^^
NameError: name 'ProjectionOperator' is not defined 

This is because the import of ProjectionOperator was behind an if statement

if has_astra:
from cil.plugins.astra import ProjectionOperator

but the tests aren't skipped if astra is not installed

@MargaretDuff MargaretDuff added the bug Something isn't working label Jan 6, 2025
@MargaretDuff MargaretDuff self-assigned this Jan 6, 2025
@MargaretDuff MargaretDuff changed the title SPDHG tests running SPDHG tests running in an environment without astra Jan 7, 2025
@MargaretDuff MargaretDuff linked a pull request Jan 7, 2025 that will close this issue
9 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant