Skip to content

Conversation

nonhermitian
Copy link
Contributor

Description

The new mapper tests were hardcoded to the qx5, since that is where the tests failed, but the test should not actually rely on the backend being there.

Motivation and Context

Tests would fail if token did not have access to the qx5. Now a fake backend is passed with the qx5 coupling map, and minimal additional information for compiling to work.

How Has This Been Tested?

Tests modified and passing locally.

Screenshots (if appropriate):

Types of changes

  • [X ] Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • [X ] My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • [X ] I have added tests to cover my changes.
  • [X ] All new and existing tests passed.

Copy link
Member

@diego-plan9 diego-plan9 left a comment

Choose a reason for hiding this comment

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

Thanks, @nonhermitian ! We could probably apply a similar solution to other tests throughout the test suite, as indeed not having them rely on a specific backend (specially if they depend on the topology, which might be subject to change) as well.

@diego-plan9 diego-plan9 merged commit c0870c7 into Qiskit:master Jun 4, 2018
lia-approves pushed a commit to edasgupta/qiskit-terra that referenced this pull request Jul 30, 2019
* Fix hardcoded backend tests

* make pylint happy

* add class doc
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.

4 participants