Skip to content

Commit

Permalink
Edit test_widget.py
Browse files Browse the repository at this point in the history
  • Loading branch information
ezrabru committed Nov 18, 2022
1 parent b8c87b1 commit 2801134
Showing 1 changed file with 20 additions and 14 deletions.
34 changes: 20 additions & 14 deletions src/napari_polcam/_tests/test_widget.py
Original file line number Diff line number Diff line change
@@ -1,18 +1,24 @@
import numpy as np
#import numpy as np

from napari_polcam import StokesQWidget
#from napari_polcam import StokesQWidget


# make_napari_viewer is a pytest fixture that returns a napari viewer object
# capsys is a pytest fixture that captures stdout and stderr output streams
def test_example_q_widget(make_napari_viewer, capsys):
# make viewer and add an image layer using our fixture
viewer = make_napari_viewer()
viewer.add_image(np.random.random((100, 100)))
def test_sum():
assert sum([1, 2, 3]) == 6, "Should be 6"

# create our widget, passing in the viewer
try:
my_widget = StokesQWidget(viewer)
return True
except:
return False
def test_sum_tuple():
assert sum((1, 2, 2)) == 6, "Should be 6"

## make_napari_viewer is a pytest fixture that returns a napari viewer object
## capsys is a pytest fixture that captures stdout and stderr output streams
#def test_example_q_widget(make_napari_viewer, ):
# # make viewer and add an image layer using our fixture
# viewer = make_napari_viewer()
# viewer.add_image(np.random.random((100, 100)))
#
# # create our widget, passing in the viewer
# try:
# my_widget = StokesQWidget(viewer)
# return True
# except:
# return False

0 comments on commit 2801134

Please sign in to comment.