Skip to content

Skip TestJupyter tests if ibmq provider is not installed#3845

Merged
mergify[bot] merged 4 commits into
Qiskit:masterfrom
mtreinish:fix-pbars-test
Feb 14, 2020
Merged

Skip TestJupyter tests if ibmq provider is not installed#3845
mergify[bot] merged 4 commits into
Qiskit:masterfrom
mtreinish:fix-pbars-test

Conversation

@mtreinish
Copy link
Copy Markdown
Member

Summary

The tests in test.python.tools.jupyter.TestJupyter rely on the ibmq
provider for the execution of the notebooks. However we don't require
the local installation (or the configuration) of the provider for
running tests anywhere else. In cases where someone is missing either
ibmq or credentials the tests (of which only test_jupyter_jobs_pbars) in
the class will fail because they can't import qiskit.IBMQ. This commit
addresses this issue by adding a skip to the class on
hasattr(qiskit, 'IBMQ') so that if the ibmq provider is not installed
the tests will all skip.

Details and comments

The tests in test.python.tools.jupyter.TestJupyter rely on the ibmq
provider for the execution of the notebooks. However we don't require
the local installation (or the configuration) of the provider for
running tests anywhere else. In cases where someone is missing either
ibmq or credentials the tests (of which only test_jupyter_jobs_pbars) in
the class will fail because they can't import qiskit.IBMQ. This commit
addresses this issue by adding a skip to the class on
hasattr(qiskit, 'IBMQ') so that if the ibmq provider is not installed
the tests will all skip.
@kdk kdk added the automerge label Feb 14, 2020
@mergify mergify Bot merged commit 2f28f7e into Qiskit:master Feb 14, 2020
@mtreinish mtreinish deleted the fix-pbars-test branch February 15, 2020 01:18
faisaldebouni pushed a commit to faisaldebouni/qiskit-terra that referenced this pull request Aug 5, 2020
* Skip TestJupyter tests if ibmq provider is not installed

The tests in test.python.tools.jupyter.TestJupyter rely on the ibmq
provider for the execution of the notebooks. However we don't require
the local installation (or the configuration) of the provider for
running tests anywhere else. In cases where someone is missing either
ibmq or credentials the tests (of which only test_jupyter_jobs_pbars) in
the class will fail because they can't import qiskit.IBMQ. This commit
addresses this issue by adding a skip to the class on
hasattr(qiskit, 'IBMQ') so that if the ibmq provider is not installed
the tests will all skip.

* Disable broken lint rule

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants