mirror of
https://github.com/wassname/scikit-image.git
synced 2026-06-27 20:06:43 +08:00
Merge pull request #1436 from ericdill/save-buttons-fix
TST: Barn-door testing of SaveButtons clicks
This commit is contained in:
@@ -101,6 +101,11 @@ def test_save_buttons():
|
||||
timer = QtCore.QTimer()
|
||||
timer.singleShot(100, QtGui.QApplication.quit)
|
||||
|
||||
# exercise the button clicks
|
||||
sv.save_stack.click()
|
||||
sv.save_file.click()
|
||||
|
||||
# call the save functions directly
|
||||
sv.save_to_stack()
|
||||
with expected_warnings(['precision loss']):
|
||||
sv.save_to_file(filename)
|
||||
|
||||
@@ -80,9 +80,9 @@ class SaveButtons(BaseWidget):
|
||||
notify(msg)
|
||||
|
||||
def save_to_file(self, filename=None):
|
||||
if filename is None:
|
||||
if not filename:
|
||||
filename = dialogs.save_file_dialog()
|
||||
if filename is None:
|
||||
if not filename:
|
||||
return
|
||||
image = self.plugin.filtered_image
|
||||
if image.dtype == np.bool:
|
||||
|
||||
Reference in New Issue
Block a user