From 0dd2946b44efd46fa2d73c19a71011006c11ffde Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Rollin?= Date: Mon, 13 Nov 2023 16:19:13 +0100 Subject: [PATCH] [BUG] Desactived depreciation test & add test for website builder (#586) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ### Summary The test depreciation test can't be used right now until the new version of qiskit isn't largely used. It come from we still used the old way to check the qiskit version of projects in order to not get the terra version. It will be able to revert this change when qiskit terra gonna totally disappeared. Cause : https://github.com/Qiskit/ecosystem/blob/0212a863ffdc1ece3964285ac295db6565500332/ecosystem/templates/configured_tox.ini#L32 As we want to keep the qiskit version and not the terra version we have to keep it this way for now. ### Details and comments - [x] Update test `test_tests_runner_on_simple_repo` - [x] Add test `test_website_builder` --- Closes #572 --------- Co-authored-by: Eric Arellano <14852634+Eric-Arellano@users.noreply.github.com> --- tests/runners/test_runner.py | 3 ++- tests/test_manager.py | 5 +++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/tests/runners/test_runner.py b/tests/runners/test_runner.py index 963328314a..07b91e50d6 100644 --- a/tests/runners/test_runner.py +++ b/tests/runners/test_runner.py @@ -38,7 +38,8 @@ def test_tests_runner_on_simple_repo(self): runner.cloned_repo_directory = self.simple_project_dir qiskit_version, result = runner.workload() - self.assertFalse(all(r.has_qiskit_deprecation_logs for r in result)) + # Uncomment when qiskit-terra is completely unused. + # self.assertFalse(all(r.has_qiskit_deprecation_logs for r in result)) self.assertTrue(all(r.ok for r in result)) self.assertTrue(qiskit_version) diff --git a/tests/test_manager.py b/tests/test_manager.py index 4a786b417b..cb61f59b9b 100644 --- a/tests/test_manager.py +++ b/tests/test_manager.py @@ -94,6 +94,11 @@ def _delete_members_json(self): if not os.path.exists(self.path): os.makedirs(self.path) + def test_build_website(self): + """Test the website builder function.""" + manager = Manager(root_path=f"{os.path.abspath(os.getcwd())}/../") + self.assertIsInstance(manager.build_website(), str) + def test_parser_issue(self): """Tests issue parsing function. Function: Manager