Update linting for tests
This commit is contained in:
+3
-4
@@ -17,7 +17,7 @@ General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
"""
|
||||
""" # noqa
|
||||
from __future__ import annotations
|
||||
|
||||
from unittest.mock import MagicMock
|
||||
@@ -35,7 +35,6 @@ class MockGuiMain(QWidget):
|
||||
self.docViewer = MagicMock()
|
||||
self.mainProgress = MagicMock()
|
||||
self.projPath = ""
|
||||
return
|
||||
|
||||
def postLaunchTasks(self, cmdOpen):
|
||||
return
|
||||
@@ -45,7 +44,6 @@ class MockGuiMain(QWidget):
|
||||
|
||||
def openProject(self, projPath):
|
||||
self.projPath = projPath
|
||||
return
|
||||
|
||||
def rebuildIndex(self):
|
||||
return
|
||||
@@ -64,7 +62,6 @@ class MockTheme:
|
||||
self.guiFont = QFont()
|
||||
self.guiFontB = QFont()
|
||||
self.guiFontBU = QFont()
|
||||
return
|
||||
|
||||
def initThemes(self) -> None:
|
||||
return
|
||||
@@ -96,8 +93,10 @@ class MockApp:
|
||||
# Mock functions that will raise errors instead.
|
||||
|
||||
def causeOSError(*args, **kwargs):
|
||||
"""Raise an OSError."""
|
||||
raise OSError("Mock OSError")
|
||||
|
||||
|
||||
def causeException(*args, **kwargs):
|
||||
"""Raise an Exception."""
|
||||
raise Exception("Mock Exception")
|
||||
|
||||
Reference in New Issue
Block a user