From 882bd9176e849be6d6f158b22b2429d9c6e969df Mon Sep 17 00:00:00 2001 From: Ali Abid Date: Thu, 30 Dec 2021 11:02:18 +0000 Subject: [PATCH] fix tests --- test/test_outputs.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/test_outputs.py b/test/test_outputs.py index 752568ed15..ba395f2c44 100644 --- a/test/test_outputs.py +++ b/test/test_outputs.py @@ -71,7 +71,8 @@ class TestLabel(unittest.TestCase): with tempfile.TemporaryDirectory() as tmpdir: to_save = label_output.save_flagged(tmpdir, "label_output", label, None) self.assertEqual(to_save, '{"3": 0.7, "1": 0.2}') - self.assertEqual(label_output.restore_flagged(tmpdir, to_save, None), {"3": 0.7, "1": 0.2}) + self.assertEqual(label_output.restore_flagged(tmpdir, to_save, None), + {'label': '3', 'confidences': [{"label": "3", "confidence": 0.7}, {"label": "1", "confidence": 0.2}]}) with self.assertRaises(ValueError): label_output = gr.outputs.Label(type="unknown") label_output.deserialize([1, 2, 3])