mirror of
https://github.com/olivierkes/manuskript.git
synced 2024-09-21 03:51:26 +12:00
23 lines
628 B
Python
23 lines
628 B
Python
|
#!/usr/bin/env python
|
||
|
# --!-- coding: utf8 --!--
|
||
|
|
||
|
"""Tests for the welcome widget."""
|
||
|
|
||
|
def test_autoLoad(MWNoProject):
|
||
|
"""
|
||
|
Tests for the welcome widget using MainWindow with no open project.
|
||
|
"""
|
||
|
MW = MWNoProject
|
||
|
from PyQt5.QtCore import QSettings
|
||
|
|
||
|
# Testing when no autoLoad
|
||
|
QSettings().remove("autoLoad")
|
||
|
autoLoad, path = MW.welcome.getAutoLoadValues()
|
||
|
assert type(autoLoad) == bool
|
||
|
assert autoLoad == False
|
||
|
|
||
|
for v in [True, False, 42, "42", None, True]:
|
||
|
MW.welcome.setAutoLoad(v)
|
||
|
autoLoad, path = MW.welcome.getAutoLoadValues()
|
||
|
assert type(autoLoad) == bool
|