mirror of
https://github.com/olivierkes/manuskript.git
synced 2024-05-10 16:02:33 +12:00
Fixing the tests for travis-CI
This commit is contained in:
parent
f5fa60c50c
commit
d22eb3bcb9
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -11,6 +11,7 @@
|
|||
.idea
|
||||
.project
|
||||
.pydevproject
|
||||
.python-version
|
||||
.settings/org.eclipse.core.resources.prefs
|
||||
.vscode
|
||||
ExportTest
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#!/usr/bin/env python
|
||||
# --!-- coding: utf8 --!--
|
||||
import imp
|
||||
import importlib
|
||||
import os
|
||||
import re
|
||||
|
||||
|
@ -594,7 +594,7 @@ class MainWindow(QMainWindow, Ui_MainWindow):
|
|||
|
||||
if loadFromFile:
|
||||
# Load empty settings
|
||||
imp.reload(settings)
|
||||
importlib.reload(settings)
|
||||
settings.initDefaultValues()
|
||||
|
||||
# Load data
|
||||
|
|
|
@ -250,7 +250,8 @@ class abstractItem():
|
|||
# Setting data
|
||||
self._data[column] = data
|
||||
|
||||
if column == self.enum.ID:
|
||||
# The _model will be none during splitting
|
||||
if self._model and column == self.enum.ID:
|
||||
self._model.updateAvailableIDs(data)
|
||||
|
||||
# Emit signal
|
||||
|
|
|
@ -123,10 +123,10 @@ def test_modelStuff(outlineModelBasic):
|
|||
assert folder.findItemsContaining("VALUE", cols, MW, True) == []
|
||||
assert folder.findItemsContaining("VALUE", cols, MW, False) == [text2.ID()]
|
||||
|
||||
# Model, count and copy
|
||||
# Model, count and copy
|
||||
k = folder._model
|
||||
folder.setModel(14)
|
||||
assert text2._model == 14
|
||||
folder.setModel(None)
|
||||
assert text2._model is None
|
||||
folder.setModel(k)
|
||||
assert folder.columnCount() == len(folder.enum)
|
||||
text1 = text2.copy()
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
# --!-- coding: utf8 --!--
|
||||
|
||||
import locale
|
||||
import imp
|
||||
import importlib
|
||||
import os
|
||||
|
||||
from PyQt5.QtCore import QSettings, QRegExp, Qt, QDir
|
||||
|
@ -427,7 +427,7 @@ class welcome(QWidget, Ui_welcome):
|
|||
"""Initialize a basic Manuskript project."""
|
||||
|
||||
# Empty settings
|
||||
imp.reload(settings)
|
||||
importlib.reload(settings)
|
||||
settings.initDefaultValues()
|
||||
self.mw.loadEmptyDatas()
|
||||
|
||||
|
|
Loading…
Reference in a new issue