Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move QiskitTestCase to qiskit.test #1616

Merged
merged 6 commits into from
Dec 28, 2018

Conversation

diego-plan9
Copy link
Member

Summary

Move the basis classes and utilities for the unitests (QiskitTestCase, the decorators, and the related functionality) to qiskit.test, taking the chance to add some tweaks:

  • split the previous test/python/common.py into several files, to reduce its size and make the new module more manageable.
  • moved a JobTestCase to ibmq, as it was the only place where it was used.
  • add a resource path for qasms, for consistency.
  • revise assertDictAlmostEqual, shortening the method.

This hopefully paves the way towards allowing third-party implementations to reuse parts of our framework, and eventually allow us to define some sort of "canonical" tests should we want to. The most likely short-term benefit will be for the providers outside the repo, and also prepares for #1389 and other efforts (for example, documentation for the base clases can be included in the Sphinx autodocs).

Details and comments

Note that in the PR, test/python/common.py remains as basically a thin layer that imports from qiskit.test - this was mostly done to avoid touching all the test files (which should be done eventually in another PR).

Copy link
Member

@jaygambetta jaygambetta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

your going to make conflict mess for me but i will fix it

@jaygambetta jaygambetta merged commit 8245a11 into Qiskit:master Dec 28, 2018
@diego-plan9 diego-plan9 deleted the feature/test-framework branch December 28, 2018 14:22
lia-approves pushed a commit to edasgupta/qiskit-terra that referenced this pull request Jul 30, 2019
* Move JobTestCase to test.python.ibmq

* Move common testing functionality to qiskit.test

Temporary commit for moving the files to qiskit.test.

* Split qiskit.test.common into separate modules

* Style and docstring adjustments

* Add new Path.QASMS, revise existing ones

* Update CHANGELOG
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