Skip to content

Commit

Permalink
Skip tests if tensorflow not available
Browse files Browse the repository at this point in the history
  • Loading branch information
lbianchi-lbl committed Sep 6, 2023
1 parent bc5c7df commit a6061f1
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions foqus_lib/gui/tests/test_surrogate.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,14 @@
import pytest


try:
import tensorflow
except ModuleNotFoundError:
tensorflow_available = False
else:
tensorflow_available = True


pytestmark = pytest.mark.gui


Expand Down Expand Up @@ -52,6 +60,7 @@ class TestFrame:
# # "ACOSSO",
# ]
# )
@pytest.mark.skipif(not tensorflow_available, reason="tensorflow not available")
def test_run_surrogate(
self, qtbot, frame, main_window: mainWindow, name: str = "keras_nn"
):
Expand Down

0 comments on commit a6061f1

Please sign in to comment.