def test_dict(): cols = dict(fore_color='orange', back_color='black', link_color='ground color', visited_color='lavender' ) result = colors(**cols) print(result) assert result == ('orange', 'black', 'ground color', 'lavender')
def test_pos(): result = colors('red', 'blue', 'yellow', 'chartreuse') assert result == ('red', 'blue', 'yellow', 'chartreuse')
def test_tuple_dict(): regular = ('red', 'blue') links = {'link_color': 'chartreuse'} result = colors(*regular, **links) print(result) assert result == ('red', 'blue', 'chartreuse', 'lavender')
def test_tuple(): color_tup = ('blue', 'red') result = colors(*color_tup) assert result == ('blue', 'red', 'green', 'lavender')
def test_default(): result = colors() assert result == ('red', 'blue', 'green', 'lavender')
def test_combination(): with pytest.raises(TypeError): result = colors('purple', link_color='red', fore_color='blue')
def test_key(): result = colors(link_color='red', back_color='blue') assert result == ('red', 'blue', 'red', 'lavender')