def test_compile_source():
    compiler = compilers.Stylus()

    assert utils.fix_line_breaks(compiler.compile_source("p\n  color: red;")) == "p {\n  color: #f00;\n}\n\n"

    with pytest.raises(exceptions.StaticCompilationError):
        assert compiler.compile_source("broken")
dataset/ETHPy150Open andreyfedoseev/django-static-precompiler/static_precompiler/tests/test_stylus.py/test_compile_source/original