Skip to content

Commit

Permalink
filtered app from coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
giumas committed Oct 21, 2024
1 parent b684450 commit eaf3865
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 6 deletions.
2 changes: 2 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
[run]
branch = True
source = hyo2.ssm2
omit =
hyo2/ssm2/app/*

[report]
# Regexes for lines to exclude from consideration
Expand Down
2 changes: 1 addition & 1 deletion hyo2/ssm2/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
logger.addHandler(logging.NullHandler())

name = "Sound Speed"
__version__ = '2024.2.1'
__version__ = '2024.2.2'
__copyright__ = 'Copyright 2024 University of New Hampshire, Center for Coastal and Ocean Mapping'

pkg_info = PkgInfo(
Expand Down
20 changes: 15 additions & 5 deletions hyo2/ssm2/app/gui/soundspeedmanager/mainwin.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,9 @@ def __init__(self):
self.data_cleared()
self.tabs.blockSignals(False)

# using in app tests
self.skip_do_you_really_quit = False

logger.info("* > APP: initialized!")

def on_change(self, i):
Expand Down Expand Up @@ -830,17 +833,24 @@ def _do_you_really_want(self, title="Quit", text="quit"):

def closeEvent(self, event):
""" actions to be done before close the app """
if self.skip_do_you_really_quit:
self._close(event=event)
return

reply = self._do_you_really_want("Quit", "quit %s" % app_info.app_name)
# reply = QtWidgets.QMessageBox.Yes
if reply == QtWidgets.QMessageBox.StandardButton.Yes:
event.accept()
self.lib.close()
if self.has_sdm_support:
self.tab_monitor.stop_plotting()
super(MainWin, self).closeEvent(event)
self._close(event)
else:
event.ignore()

def _close(self, event):
event.accept()
self.lib.close()
if self.has_sdm_support:
self.tab_monitor.stop_plotting()
super(MainWin, self).closeEvent(event)

# -------------------------- development-only --------------------------

def do(self):
Expand Down

0 comments on commit eaf3865

Please sign in to comment.