forked from qiskit-community/qiskit-braket-provider
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve unit test coverage to 100% (qiskit-community#179)
* Improve coverage to 100% * Improve coverage to 100% * Add tests * Improve coverage to 100% * Improve coverage to 100% * Improve coverage to 100% * Fix region retrieval * Lint import * Fix black * Fix pylint * Fix pylint * Fix pylint * Fix pylint * Fix pylint * Bump code coverage condition * improve tests * improve tests
- Loading branch information
Showing
7 changed files
with
367 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
"""Tests for Braket jobs""" | ||
|
||
from unittest import TestCase | ||
|
||
from qiskit_braket_provider.providers.braket_job import AmazonBraketTask, AWSBraketJob | ||
|
||
|
||
class TestAmazonBraketTask(TestCase): | ||
"""Tests Amazon Braket Task""" | ||
|
||
def test_deprecation_warning_on_init(self): | ||
"""Test to check if a deprecation warning is raised when initializing AmazonBraketTask""" | ||
with self.assertWarns(DeprecationWarning): | ||
|
||
class SubAmazonBraketTask( | ||
AmazonBraketTask | ||
): # pylint: disable=unused-variable | ||
"""Subclass of AmazonBraketTask for testing""" | ||
|
||
|
||
class TestAWSBraketJob(TestCase): | ||
"""Tests Amazon Braket Job""" | ||
|
||
def test_deprecation_warning_on_init(self): | ||
"""Test to check if a deprecation warning is raised when initializing AWSBraketJob""" | ||
with self.assertWarns(DeprecationWarning): | ||
|
||
class SubAwsBraketJob(AWSBraketJob): # pylint: disable=unused-variable | ||
"""Subclass of AWSBraketJob for testing""" |
Oops, something went wrong.