Changeset - fb9aa9eae11a
[Not reviewed]
0 1 0
Brett Smith - 3 years ago 2021-01-29 16:28:18
brettcsmith@brettcsmith.org
tests: Add tests for BaseODS.bgcolor_style().
1 file changed with 10 insertions and 0 deletions:
0 comments (0 inline, 0 general)
tests/test_reports_spreadsheet.py
Show inline comments
...
 
@@ -308,6 +308,16 @@ def test_ods_writer_style(ods_writer, attr_name, child_type, checked_attr):
 
    child = get_child(actual, child_type)
 
    assert child.getAttribute(checked_attr)
 

	
 
@pytest.mark.parametrize('hexcolor', ['#0000ff', '#66cc99'])
 
def test_ods_writer_bgcolor_style(ods_writer, hexcolor):
 
    style = ods_writer.bgcolor_style(hexcolor)
 
    props, = style.childNodes
 
    assert props.getAttribute('backgroundcolor') == hexcolor
 

	
 
def test_ods_writer_bgcolor_style_caches(ods_writer):
 
    style1 = ods_writer.bgcolor_style('#008800')
 
    assert ods_writer.bgcolor_style('#008800') is style1
 

	
 
@pytest.mark.parametrize('edges,width,style,color', [
 
    (core.Border.TOP,
 
     '5px', 'solid', '#ff0000'),
0 comments (0 inline, 0 general)