Skip to content

Commit

Permalink
chore: revert changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Pratyush Singh committed Oct 12, 2023
1 parent c8d6fe4 commit b5ec342
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 19 deletions.
21 changes: 10 additions & 11 deletions tests/end2end/end2end_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
from assistant_skill_analysis.utils import skills_util
import json

@unittest.skip("skip")
class TestNotebook(unittest.TestCase):
@classmethod
def setUpClass(cls):
Expand Down Expand Up @@ -35,16 +34,16 @@ def setUpClass(cls):
_ = fi.readline().strip()
cls.assistant_id = fi.readline().strip()

# def test_notebook(self):
# test_file = "tests/resources/test_workspaces/customer_care_skill_test.tsv"
# nb, errors = skills_util.run_notebook(
# notebook_path="classic_dialog_skill_analysis.ipynb",
# iam_apikey=self.apikey,
# wksp_id=self.wksp_id,
# test_file=test_file,
# output_path="notebook_output",
# )
# self.assertEqual(errors, [])
def test_notebook(self):
test_file = "tests/resources/test_workspaces/customer_care_skill_test.tsv"
nb, errors = skills_util.run_notebook(
notebook_path="classic_dialog_skill_analysis.ipynb",
iam_apikey=self.apikey,
wksp_id=self.wksp_id,
test_file=test_file,
output_path="notebook_output",
)
self.assertEqual(errors, [])

def test_action_notebook(self):
test_file = "tests/resources/test_workspaces/test_set_action.tsv"
Expand Down
13 changes: 5 additions & 8 deletions tests/utils/test_workspace_credentials.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
CONFIG_FILE_ACTION = "./wa_config_action.txt"


# @unittest.skip("skip")
@unittest.skip("skip")
class TestWorkspaceCredential(unittest.TestCase):
@classmethod
def setUpClass(cls):
Expand All @@ -20,8 +20,7 @@ def setUpClass(cls):
with open(CONFIG_FILE_ACTION) as fi:
_ = fi.readline().strip()
cls.assistant_id = fi.readline().strip()

@unittest.skip("skip")

def test_workspace_credentials(self):
conversation = retrieve_conversation(
iam_apikey=self.apikey,
Expand All @@ -48,11 +47,9 @@ def test_action_credentials(self):
assistant_id=self.assistant_id,
).get_result()

# self.assertAlmostEqual(
# 1, result["output"]["intents"][0]["confidence"], delta=1e-6
# )

self.assertGreater(len(result), 0)
self.assertAlmostEqual(
1, result["output"]["intents"][0]["confidence"], delta=1e-6
)


if __name__ == "__main__":
Expand Down

0 comments on commit b5ec342

Please sign in to comment.