Skip to content
This repository was archived by the owner on Nov 16, 2023. It is now read-only.

Commit efece40

Browse files
committed
Increase test coverage
1 parent 2a99f6b commit efece40

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

qrao/encoding.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -327,6 +327,7 @@ def qubit_op(self) -> Union[PauliOp, PauliSumOp]:
327327
"from now on and will be removed in the future."
328328
)
329329
def offset(self) -> float:
330+
# pragma: no cover (deprecated)
330331
if self._qubit_op is None:
331332
raise AttributeError(
332333
"No objective function has been provided from which a "

tests/test_quantum_random_access_optimizer.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,8 @@ def test_solve_without_args(self):
161161
self.assertIsNot(results.samples[0].fval, np.nan)
162162
self.assertIsInstance(results.relaxed_results, MinimumEigensolverResult)
163163
self.assertIsInstance(results.rounding_results, RoundingResult)
164+
self.assertIsInstance(results.relaxed_fval, float)
165+
self.assertIsInstance(repr(results), str)
164166

165167
def test_empty_encoding(self):
166168
"""Test that an exception is raised if the encoding has no qubits"""

0 commit comments

Comments
 (0)