summaryrefslogtreecommitdiff
path: root/scss/tests/functions/test_extra.py
blob: af15d8cb2b274842d2269fac31bd388bb23f7923 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
"""Tests for extra non-standard functions.

These tests call the relevant functions directly, rather than going through a
calculator.  They all do a considerable amount of work, and that's what's being
tested, rather than the parsing or type system.
"""
from __future__ import absolute_import
from __future__ import unicode_literals

import scss.functions.extra as libextra
from scss.types import Boolean, Color, Number


# TODO: currently these all just call the functions and make sure they pass.
# would be nice to check the output, though that's a little tedious.

def test_background_noise():
    libextra.background_noise(Number(0.5), Number(0.5), Number(100), Boolean(True), color=Color.from_name('green'))


def test_background_brushed():
    libextra.background_brushed(Number(0.5), Number(0.5), Color.from_name('red'), Number(0.5))


def test_grid_image():
    # TODO this should accept sass values only  :|
    libextra.grid_image(5, 100, 5, 100)


def test_image_color():
    libextra.image_color(Color.from_rgb(1, 1, 0))
    assert True