Add test cases for the ContainerManager

This commit is contained in:
Jaime van Kessel 2019-03-15 16:17:28 +01:00
parent 8518aba3a5
commit 7bb35cdbf7
2 changed files with 36 additions and 2 deletions

View file

@ -47,8 +47,10 @@ class ContainerManager(QObject):
if ContainerManager.__instance is not None:
raise RuntimeError("Try to create singleton '%s' more than once" % self.__class__.__name__)
ContainerManager.__instance = self
super().__init__(parent = application)
try:
super().__init__(parent = application)
except TypeError:
super().__init__()
self._application = application # type: CuraApplication
self._plugin_registry = self._application.getPluginRegistry() # type: PluginRegistry