Exemplo n.º 1
0
def test_include_badtype():
    with pytest.raises(TypeError):
        sht(H.include(path=os.path.join(here, "x.css"), type="text/whatever"))
Exemplo n.º 2
0
def test_include_css():
    assert sht(
        H.include(path=os.path.join(here, "x.css"), type="text/css")
    ) == H.style(".hello { color: red; }\n")
Exemplo n.º 3
0
def test_include_notype():
    with pytest.raises(TypeError):
        sht(H.include(path=os.path.join(here, "x.css"),))
Exemplo n.º 4
0
def test_include_js():
    assert sht(
        H.include(path=os.path.join(here, "x.js"), type="text/javascript")
    ) == H.script("function hello(x) { return x * x; }\n")