From 4c73c93ad98b42c6eb2852a57064621b8f439582 Mon Sep 17 00:00:00 2001 From: davidmezzetti <561939+davidmezzetti@users.noreply.github.com> Date: Thu, 10 Dec 2020 18:49:58 -0500 Subject: [PATCH] Add tests for annotation report --- test/python/testreport.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/test/python/testreport.py b/test/python/testreport.py index 1e38f9e..47cb50f 100644 --- a/test/python/testreport.py +++ b/test/python/testreport.py @@ -53,3 +53,21 @@ def testReport2(self): # Check file hashes for name, value in hashes: self.assertEqual(Utils.hashfile(Utils.PATH + "/" + name), value) + + @unittest.skipIf(os.name == "nt", "Faiss not installed on Windows") + def testReport3(self): + """ + Runs test queries from report3.yml test file + """ + + # Execute report + Execute.run(Utils.PATH + "/report3.yml", 1, "csv", Utils.PATH, None) + Execute.run(Utils.PATH + "/report3.yml", 1, "md", Utils.PATH, None) + Execute.run(Utils.PATH + "/report3.yml", 1, "ant", Utils.PATH, None, Utils.PATH) + + hashes = [("AI.csv", "b47e96639a210d2089a5bd4e7e7bfc98"), + ("Report3.md", "1a47340bc135fc086160c62f8731edee")] + + # Check file hashes + for name, value in hashes: + self.assertEqual(Utils.hashfile(Utils.PATH + "/" + name), value)