Skip to content

Commit

Permalink
lint in test files
Browse files Browse the repository at this point in the history
  • Loading branch information
wspr committed Mar 9, 2024
1 parent fa3ca66 commit 1ef8d9e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 11 deletions.
5 changes: 2 additions & 3 deletions pysankey/tests/test_error_case.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,13 @@


class TestErrorCase(TestFruit):

""" Test sankey's error case. """

def test_bad_color_labels(self):
""" sankey raise a value error when there is not enough color info"""
bad_color_dict = {
'apple':'#f71b1b',
'orange':'#f78c1b'
'apple': '#f71b1b',
'orange': '#f78c1b'
}
with self.assertRaises(ValueError) as value_error:
sankey(
Expand Down
14 changes: 6 additions & 8 deletions pysankey/tests/test_fruit.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
# -*- coding: utf-8 -*-

import pandas as pd
from pysankey.tests.generic_test import GenericTest


class TestFruit(GenericTest):

""" Permit to test sankey with the data in fruit.txt """

def setUp(self):
Expand All @@ -14,9 +11,10 @@ def setUp(self):
'pysankey/fruits.txt', sep=' ', names=['true', 'predicted']
)
self.colorDict = {
'apple':'#f71b1b',
'blueberry':'#1b7ef7',
'banana':'#f3f71b',
'lime':'#12e23f',
'orange':'#f78c1b'
'apple': '#f71b1b',
'blueberry': '#1b7ef7',
'banana': '#f3f71b',
'lime': '#12e23f',
'orange': '#f78c1b'
}

0 comments on commit 1ef8d9e

Please sign in to comment.