This commit is contained in:
AK391 2021-11-03 17:30:36 -04:00
parent f89c4aaca3
commit 7fe7672361

View File

@ -4,7 +4,7 @@ import unittest.mock as mock
import requests
class TestUtils(unittest.TestCase):
class TestInterface(unittest.TestCase):
@ -63,7 +63,7 @@ class TestUtils(unittest.TestCase):
interface = Interface(lambda input: None, "textbox", "label")
interface.close = mock.MagicMock()
reset_all()
interface.close.assert_called_with()
interface.close.assert_called()
def test_examples_invalid_input(self):
with self.assertRaises(ValueError):
@ -74,11 +74,6 @@ class TestUtils(unittest.TestCase):
interface = Interface(lambda input: None, "textbox", "label", examples='wrong-path')
interface.launch()
def test_interpretation_shap_not_installed(self):
with self.assertRaises(ValueError):
interface = Interface(lambda input: None, "textbox", "label", interpretation='shap')
interface.interpret('raw_input')
if __name__ == '__main__':
unittest.main()