Files
novelWriter/tests/dummy.py
T
Veronica K. B. Olsen 91ece2b7f2 New test for ToHtml class
2020-12-04 20:58:44 +01:00

54 lines
1.2 KiB
Python

# -*- coding: utf-8 -*-
"""novelWriter Test Dummy GUI Classes
"""
# =========================================================================== #
# Mock GUI
# =========================================================================== #
class DummyMain():
def __init__(self):
self.mainConf = None
self.hasProject = True
self.theIndex = None
self.theProject = None
self.statusBar = StatusBar()
return
def makeAlert(self, theMessage, theLevel):
print("%s: %s" % (str(theLevel), theMessage))
return
def setStatus(self, theMessage):
return
def setProjectStatus(self, isChanged):
return
def openProject(self, projPath):
return
def rebuildIndex(self):
return
# END Class GuiMain
class StatusBar():
def __init__(self):
return
def setStatus(self, theText):
return
# END Class StatusBar
# =========================================================================== #
# Error Functions
# Dummy functions that will raise errors instead.
# =========================================================================== #
def causeOSError(*args, **kwargs):
raise OSError