Skip to content

Commit

Permalink
Test yield
Browse files Browse the repository at this point in the history
  • Loading branch information
C-Achard committed Mar 3, 2023
1 parent 96a5783 commit 93748d7
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test_and_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ jobs:
# this runs the platform-specific tests declared in tox.ini
- name: Test with tox
uses: aganders3/headless-gui@v1 # GabrielBB/xvfb-action@v1
uses: GabrielBB/xvfb-action@v1 # aganders3/headless-gui@v1
with:
run: python -m tox
env:
Expand Down
4 changes: 2 additions & 2 deletions napari_cellseg3d/_tests/test_plugin_inference.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def test_inference(make_napari_viewer, qtbot):
widget.start() # takes too long on Github Actions
assert widget.worker is not None

# with qtbot.waitSignal(signal=widget.worker.finished, timeout=60000, raising=False) as blocker:
# blocker.connect(widget.worker.errored)
with qtbot.waitSignal(signal=widget.worker.yielded, timeout=60000, raising=False) as blocker:
blocker.connect(widget.worker.errored)

# assert len(viewer.layers) == 2
5 changes: 3 additions & 2 deletions napari_cellseg3d/_tests/test_training.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ def test_training(make_napari_viewer, qtbot):
widget.images_filepaths = [im_path]
widget.labels_filepaths = [im_path]
widget.epoch_choice.setValue(1)
widget.val_interval_choice.setValue(1)

assert widget.check_ready()

Expand All @@ -33,8 +34,8 @@ def test_training(make_napari_viewer, qtbot):
widget.start()
assert widget.worker is not None

# with qtbot.waitSignal(signal=widget.worker.finished, timeout=60000, raising=False) as blocker: # wait only for 60 seconds.
# blocker.connect(widget.worker.errored)
with qtbot.waitSignal(signal=widget.worker.yielded, timeout=60000, raising=False) as blocker: # wait only for 60 seconds.
blocker.connect(widget.worker.errored)


def test_update_loss_plot(make_napari_viewer):
Expand Down

0 comments on commit 93748d7

Please sign in to comment.