24 lines
464 B
Python
24 lines
464 B
Python
|
from undercover import css
|
||
|
|
||
|
|
||
|
def test_empty_string():
|
||
|
assert css.optimize_css("") == ""
|
||
|
|
||
|
|
||
|
def test_simple_definition():
|
||
|
simple_definition = """
|
||
|
div {
|
||
|
width: 100%;
|
||
|
}
|
||
|
"""
|
||
|
assert css.optimize_css(simple_definition) == "div{width:100%;}"
|
||
|
|
||
|
|
||
|
def test_multi_part_property():
|
||
|
simple_definition = """
|
||
|
div {
|
||
|
padding: 1em 2em 3em 4em;
|
||
|
}
|
||
|
"""
|
||
|
assert css.optimize_css(simple_definition) == "div{padding:1em 2em 3em 4em;}"
|