Skip to content

Commit

Permalink
Merge branch 'release_6.0.0' into 2D-Data-Processing-for-Pr
Browse files Browse the repository at this point in the history
  • Loading branch information
Wojciech Potrzebowski authored Dec 3, 2023
2 parents 5d5f27c + ac73cd6 commit 6bd8ebb
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions installers/sasview.spec
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ datas = [
datas.append((os.path.join(PYTHON_PACKAGES, 'debugpy'), 'debugpy'))
datas.append((os.path.join(PYTHON_PACKAGES, 'jedi'), 'jedi'))
datas.append((os.path.join(PYTHON_PACKAGES, 'zmq'), 'zmq'))
datas.append((os.path.join(PYTHON_PACKAGES, 'freetype'), 'freetype'))

def add_data(data):
for component in data:
Expand Down
2 changes: 1 addition & 1 deletion src/sas/qtgui/Utilities/Reports/ReportDialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def onPrint(self):
try:
# pylint chokes on this line with syntax-error
# pylint: disable=syntax-error doesn't seem to help
document.print(printer)
document.print_(printer)
except Exception as ex:
# Printing can return various exceptions, let's catch them all
logging.error("Print report failed with: " + str(ex))
Expand Down
4 changes: 2 additions & 2 deletions src/sas/qtgui/Utilities/UnitTesting/ReportDialogTest.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def testDefaults(self, widget):
def testOnPrint(self, widget, mocker):
''' Printing the report '''
document = widget.txtBrowser.document()
mocker.patch.object(document, 'print')
mocker.patch.object(document, 'print_')

# test rejected dialog
mocker.patch.object(QtPrintSupport.QPrintDialog, 'exec_', return_value=QtWidgets.QDialog.Rejected)
Expand All @@ -60,7 +60,7 @@ def testOnPrint(self, widget, mocker):
widget.onPrint()

# Assure printing was not done
assert not document.print.called
assert not document.print_.called

# test accepted dialog
mocker.patch.object(QtPrintSupport.QPrintDialog, 'exec_', return_value=QtWidgets.QDialog.Accepted)
Expand Down

0 comments on commit 6bd8ebb

Please sign in to comment.