mirror of
https://github.com/olivierkes/manuskript.git
synced 2024-09-29 08:51:14 +13:00
22 lines
628 B
Python
22 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
|