Skip to content

Commit

Permalink
fixed the tests
Browse files Browse the repository at this point in the history
  • Loading branch information
adbharadwaj committed Apr 6, 2020
1 parent 402c5fa commit bc54578
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions tests/legend_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ def test_gslegend():
test_remove_legend_entries()
test_remove_invalid_legend_entries()
test_delete_legend_json()
pass


def test_set_legend_json():
Expand Down Expand Up @@ -48,14 +49,14 @@ def test_add_legend_entries():
def test_add_invalid_legend_entries():
Ld = GSLegend()
style = {'background-color': 'yellow'}
with pytest.raises(KeyError):
with pytest.raises(Exception):
Ld.add_legend_entries('nodes', 'TF', style)


def test_add_invalid_style_legend_entries():
Ld = GSLegend()
style = {'background-color': 'yellow', 'shape':'decagon'}
with pytest.raises(KeyError):
with pytest.raises(Exception):
Ld.add_legend_entries('nodes', 'TF', style)


Expand All @@ -75,7 +76,7 @@ def test_remove_legend_entries():
def test_remove_invalid_legend_entries():
Ld = GSLegend()
Ld.add_legend_entries(element_type='nodes', label='Receptor', style={'background-color': 'black', 'shape':'star'})
with pytest.raises(KeyError):
with pytest.raises(Exception):
Ld.remove_legend_entries('nodes', 'TF')


Expand Down

0 comments on commit bc54578

Please sign in to comment.