Skip to content

Deprecate qiskit.test #6862

@mtreinish

Description

@mtreinish

What is the expected enhancement?

As a follow up to #6753 we should start to deprecate the qiskit.test namespace. Most of the code there is isolated to terra's unittests and is not something we should be exporting as a public interface in the package's namespace. Test code should live as close to the tests as possible the more abstracted away it is the harder it is to debug test failures or understand what a test is actually doing. As some downstream projects use the base test classes they should probably copy them locally because every project's testing needs are different.

We should investigate if there are any things in there we still want to keep and come up with a strategy for preserving them. The only example I can think of currently is qiskit.test.mock (https://github.com/Qiskit/qiskit-terra/tree/main/qiskit/test/mock) which has all the fake backends and ibmq_mock (https://github.com/Qiskit/qiskit-terra/blob/main/qiskit/test/ibmq_mock.py ) which is used in hidden cells for jupyter executes in docstrings that use the ibmq provider. We can probably move the mock backends to qiskit.provider or make a new namespace for them. For mock_ibmq we can probably just put it in utils or tools (not sure what the distinction is there).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions