Skip to content

Commit

Permalink
Updated tests with better fiure handling
Browse files Browse the repository at this point in the history
  • Loading branch information
KilianPoirier committed Feb 14, 2024
1 parent 14bb72b commit c8d78d9
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/openqaoa-qiskit/tests/test_result_object_qiskit.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import unittest
import networkx as nx
import matplotlib.pyplot as plt

from openqaoa import QAOA
from openqaoa.problems import MinimumVertexCover
Expand All @@ -20,4 +21,7 @@ def test_plot_probabilities(self):
q_shot.compile(vc)
q_shot.optimize()

q_shot.result.plot_probabilities()
fig, ax = q_shot.result.plot_probabilities()
self.assertEqual(type(fig), plt.Figure)
self.assertEqual(type(ax), plt.Axes)
plt.close(fig)

0 comments on commit c8d78d9

Please sign in to comment.