Skip to content

Commit

Permalink
fix test_circuit
Browse files Browse the repository at this point in the history
  • Loading branch information
dominikandreasseitz committed Oct 2, 2023
1 parent 746aa0d commit 3083768
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions tests/qadence/test_circuit.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from qadence.blocks import chain, kron, primitive_blocks, tag
from qadence.circuit import QuantumCircuit
from qadence.constructors import hea
from qadence.draw import FigFormat, savefig
from qadence.draw import savefig
from qadence.operations import CNOT, RX, X, Y
from qadence.parameters import FeatureParameter, Parameter
from qadence.transpile import invert_endianness
Expand Down Expand Up @@ -138,13 +138,10 @@ def test_hea_operators() -> None:
assert param in mychain


@pytest.mark.parametrize(
"fig_format", [FigFormat.PDF, FigFormat.PNG, FigFormat.SVG, "PDF", "PNG", "SVG"]
)
@pytest.mark.parametrize("fname", ["circuit.png", "circuit.pdf", "circuit.png"])
@pytest.mark.skip
def test_savefig_circuit(fig_format: str) -> None:
def test_savefig_circuit(fname: str) -> None:
circuit = build_circuit(4, depth=2)
fname = f"circuit.{fig_format.lower()}"
savefig(circuit, fname, fig_format=fig_format)
savefig(circuit, fname)
assert os.path.isfile(fname)
Path.unlink(Path(fname))

0 comments on commit 3083768

Please sign in to comment.