Skip to content

Commit

Permalink
[BUG] Desactived depreciation test & add test for website builder (#586)
Browse files Browse the repository at this point in the history
<!--
⚠️ If you do not respect this template, your pull request will be
closed.
⚠️ Your pull request title should be short detailed and understandable
for all.
⚠️ Also, please add a release note file using reno if the change needs
to be
  documented in the release notes.
⚠️ If your pull request fixes an open issue, please link to the issue.

- [ ] I have added the tests to cover my changes.
- [ ] I have updated the documentation accordingly.
- [ ] I have read the CONTRIBUTING document.
-->

### 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 <[email protected]>
  • Loading branch information
mickahell and Eric-Arellano authored Nov 13, 2023
1 parent 13d7948 commit 0dd2946
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/runners/test_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
5 changes: 5 additions & 0 deletions tests/test_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 0dd2946

Please sign in to comment.