Did I find the right examples for you? yes no

All Samples(20)  |  Call(16)  |  Derive(0)  |  Import(4)

src/c/s/CSScheme-HEAD/tinycsscheme/tinycss/tests/test_css21.py   CSScheme(Download)
from ..css21 import CSS21Parser
 
from .test_tokenizer import jsonify
from . import assert_errors
 
    assert_errors(stylesheet.errors, expected_errors)
    result = [
        (rule.at_keyword, list(jsonify(rule.head)),
            list(jsonify(rule.body))
            if rule.body is not None else None)
        if rule.at_keyword else
        (rule.selector.as_css(), [
            (decl.name, list(jsonify(decl.value)))
def test_parse_style_attr(css_source, expected_declarations, expected_errors):
    declarations, errors = CSS21Parser().parse_style_attr(css_source)
    assert_errors(errors, expected_errors)
    result = [(decl.name, list(jsonify(decl.value)))
              for decl in declarations]

src/t/i/tinycss-0.3/tinycss/tests/test_css21.py   tinycss(Download)
from tinycss.css21 import CSS21Parser
 
from .test_tokenizer import jsonify
from . import assert_errors
 
    assert_errors(stylesheet.errors, expected_errors)
    result = [
        (rule.at_keyword, list(jsonify(rule.head)),
            list(jsonify(rule.body))
            if rule.body is not None else None)
        if rule.at_keyword else
        (rule.selector.as_css(), [
            (decl.name, list(jsonify(decl.value)))
def test_parse_style_attr(css_source, expected_declarations, expected_errors):
    declarations, errors = CSS21Parser().parse_style_attr(css_source)
    assert_errors(errors, expected_errors)
    result = [(decl.name, list(jsonify(decl.value)))
              for decl in declarations]

src/c/s/CSScheme-HEAD/tinycsscheme/tinycss/tests/test_page3.py   CSScheme(Download)
 
from ..page3 import CSSPage3Parser
from .test_tokenizer import jsonify
from . import assert_errors
 
    def declarations(rule):
        return [(decl.name, list(jsonify(decl.value)))
                for decl in rule.declarations]
 
    assert len(stylesheet.rules) == 1

src/t/i/tinycss-0.3/tinycss/tests/test_page3.py   tinycss(Download)
from tinycss.css21 import CSS21Parser
from tinycss.page3 import CSSPage3Parser
from .test_tokenizer import jsonify
from . import assert_errors
 
    def declarations(rule):
        return [(decl.name, list(jsonify(decl.value)))
                for decl in rule.declarations]
 
    assert len(stylesheet.rules) == 1