| 1 |
# -*- coding: utf-8 -*- |
| 2 |
"""Test the qtsass is compiling the SCSS files to QSS.""" |
| 3 |
|
| 4 |
# Standard library imports |
| 5 |
import tempfile |
| 6 |
|
| 7 |
# Local imports |
| 8 |
from qdarkstyle.dark.palette import DarkPalette |
| 9 |
from qdarkstyle.light.palette import LightPalette |
| 10 |
from qdarkstyle.palette import Palette |
| 11 |
from qdarkstyle.utils.scss import create_custom_qss, create_qss, create_custom_qss_from_palette |
| 12 |
|
| 13 |
|
| 14 |
def test_create_qss_dark(): |
| 15 |
# Should not raise a CompileError |
| 16 |
create_qss(DarkPalette) |
| 17 |
|
| 18 |
|
| 19 |
def test_create_qss_light(): |
| 20 |
# Should not raise a CompileError |
| 21 |
create_qss(LightPalette) |
| 22 |
|
| 23 |
|
| 24 |
# TODO: update this test and create_custom_qss for the new Palette class |
| 25 |
# def test_create_custom_qss(): |
| 26 |
# # Should not raise a CompileError |
| 27 |
|
| 28 |
# qss = create_custom_qss( |
| 29 |
# 'MyAwesomePalette', |
| 30 |
# tempfile.mkdtemp(), |
| 31 |
# '#ff0000', |
| 32 |
# '#cc0000', |
| 33 |
# '#aa0000', |
| 34 |
# '#00ff00', |
| 35 |
# '#00cc00', |
| 36 |
# '#00aa00', |
| 37 |
# '#0000ff', |
| 38 |
# '#0000cc', |
| 39 |
# '#0000aa', |
| 40 |
# '0px', |
| 41 |
# ) |
| 42 |
# assert qss |