Skip to content

Commit

Permalink
Test message fix
Browse files Browse the repository at this point in the history
  • Loading branch information
gadial committed Feb 11, 2025
1 parent 09ab685 commit c81ee1a
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 17 deletions.
6 changes: 3 additions & 3 deletions test/python/circuit/library/test_phase_oracle.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def test_evaluate_bitstring(self, expression, input_bitstring, expected):
"""PhaseOracle(...).evaluate_bitstring"""
with self.assertWarnsRegex(
DeprecationWarning,
expected_regex="BooleanExpression`` is deprecated as of Qiskit 1.4",
expected_regex="BooleanExpression`` is deprecated as of qiskit 1.4",
):
oracle = PhaseOracle(expression)
result = oracle.evaluate_bitstring(input_bitstring)
Expand All @@ -56,7 +56,7 @@ def test_statevector(self, expression, good_states):
"""Circuit generation"""
with self.assertWarnsRegex(
DeprecationWarning,
expected_regex="BooleanExpression`` is deprecated as of Qiskit 1.4",
expected_regex="BooleanExpression`` is deprecated as of qiskit 1.4",
):
oracle = PhaseOracle(expression)
num_qubits = oracle.num_qubits
Expand Down Expand Up @@ -86,7 +86,7 @@ def test_variable_order(self, expression, var_order, good_states):
"""Circuit generation"""
with self.assertWarnsRegex(
DeprecationWarning,
expected_regex="BooleanExpression`` is deprecated as of Qiskit 1.4",
expected_regex="BooleanExpression`` is deprecated as of qiskit 1.4",
):
oracle = PhaseOracle(expression, var_order=var_order)
num_qubits = oracle.num_qubits
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def test_evaluate(self, expression, input_bitstring, expected):
"""Test simulate"""
with self.assertWarnsRegex(
DeprecationWarning,
expected_regex="BooleanExpression`` is deprecated as of Qiskit 1.4",
expected_regex="BooleanExpression`` is deprecated as of qiskit 1.4",
):
expression = BooleanExpression(expression)
result = expression.simulate(input_bitstring)
Expand All @@ -59,7 +59,7 @@ def test_synth(self, expression, expected):
"""Test synth"""
with self.assertWarnsRegex(
DeprecationWarning,
expected_regex="BooleanExpression`` is deprecated as of Qiskit 1.4",
expected_regex="BooleanExpression`` is deprecated as of qiskit 1.4",
):
expression = BooleanExpression(expression)
expr_circ = expression.synth()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def test_grover_oracle(self):
"""grover_oracle.decomposition"""
with self.assertWarnsRegex(
DeprecationWarning,
expected_regex="ClassicalFunction`` is deprecated as of Qiskit 1.4",
expected_regex="ClassicalFunction`` is deprecated as of qiskit 1.4",
):
oracle = compile_classical_function(examples.grover_oracle)
quantum_circuit = QuantumCircuit(5)
Expand Down
2 changes: 1 addition & 1 deletion test/python/classical_function_compiler/test_simulate.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def test_(self, a_callable):
"""Tests LogicSimulate.simulate() on all the examples"""
with self.assertWarnsRegex(
DeprecationWarning,
expected_regex="ClassicalFunction`` is deprecated as of Qiskit 1.4",
expected_regex="ClassicalFunction`` is deprecated as of qiskit 1.4",
):
network = compile_classical_function(a_callable)
truth_table = network.simulate_all()
Expand Down
4 changes: 2 additions & 2 deletions test/python/classical_function_compiler/test_synthesis.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def test_grover_oracle(self):
"""Synthesis of grover_oracle example"""
with self.assertWarnsRegex(
DeprecationWarning,
expected_regex="ClassicalFunction`` is deprecated as of Qiskit 1.4",
expected_regex="ClassicalFunction`` is deprecated as of qiskit 1.4",
):
oracle = compile_classical_function(examples.grover_oracle)
quantum_circuit = oracle.synth()
Expand All @@ -48,7 +48,7 @@ def test_grover_oracle_arg_regs(self):
"""Synthesis of grover_oracle example with arg_regs"""
with self.assertWarnsRegex(
DeprecationWarning,
expected_regex="ClassicalFunction`` is deprecated as of Qiskit 1.4",
expected_regex="ClassicalFunction`` is deprecated as of qiskit 1.4",
):
oracle = compile_classical_function(examples.grover_oracle)
quantum_circuit = oracle.synth(registerless=False)
Expand Down
14 changes: 7 additions & 7 deletions test/python/classical_function_compiler/test_typecheck.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def test_id(self):
"""Tests examples.identity type checking"""
with self.assertWarnsRegex(
DeprecationWarning,
expected_regex="ClassicalFunction`` is deprecated as of Qiskit 1.4",
expected_regex="ClassicalFunction`` is deprecated as of qiskit 1.4",
):
network = compile_classical_function(examples.identity)
self.assertEqual(network.args, ["a"])
Expand All @@ -42,7 +42,7 @@ def test_bool_not(self):
"""Tests examples.bool_not type checking"""
with self.assertWarnsRegex(
DeprecationWarning,
expected_regex="ClassicalFunction`` is deprecated as of Qiskit 1.4",
expected_regex="ClassicalFunction`` is deprecated as of qiskit 1.4",
):
network = compile_classical_function(examples.bool_not)
self.assertEqual(network.args, ["a"])
Expand All @@ -52,7 +52,7 @@ def test_id_assign(self):
"""Tests examples.id_assing type checking"""
with self.assertWarnsRegex(
DeprecationWarning,
expected_regex="ClassicalFunction`` is deprecated as of Qiskit 1.4",
expected_regex="ClassicalFunction`` is deprecated as of qiskit 1.4",
):
network = compile_classical_function(examples.id_assing)
self.assertEqual(network.args, ["a"])
Expand All @@ -64,7 +64,7 @@ def test_bit_and(self):
"""Tests examples.bit_and type checking"""
with self.assertWarnsRegex(
DeprecationWarning,
expected_regex="ClassicalFunction`` is deprecated as of Qiskit 1.4",
expected_regex="ClassicalFunction`` is deprecated as of qiskit 1.4",
):
network = compile_classical_function(examples.bit_and)
self.assertEqual(network.args, ["a", "b"])
Expand All @@ -76,7 +76,7 @@ def test_bit_or(self):
"""Tests examples.bit_or type checking"""
with self.assertWarnsRegex(
DeprecationWarning,
expected_regex="ClassicalFunction`` is deprecated as of Qiskit 1.4",
expected_regex="ClassicalFunction`` is deprecated as of qiskit 1.4",
):
network = compile_classical_function(examples.bit_or)
self.assertEqual(network.args, ["a", "b"])
Expand All @@ -88,7 +88,7 @@ def test_bool_or(self):
"""Tests examples.bool_or type checking"""
with self.assertWarnsRegex(
DeprecationWarning,
expected_regex="ClassicalFunction`` is deprecated as of Qiskit 1.4",
expected_regex="ClassicalFunction`` is deprecated as of qiskit 1.4",
):
network = compile_classical_function(examples.bool_or)
self.assertEqual(network.args, ["a", "b"])
Expand All @@ -114,7 +114,7 @@ def test_bit_not(self):
with self.assertRaises(ClassicalFunctionCompilerTypeError) as context:
with self.assertWarnsRegex(
DeprecationWarning,
expected_regex="ClassicalFunction`` is deprecated as of Qiskit 1.4",
expected_regex="ClassicalFunction`` is deprecated as of qiskit 1.4",
):
compile_classical_function(bad_examples.bit_not)
self.assertExceptionMessage(context, "does not operate with Int1 type")
2 changes: 1 addition & 1 deletion test/python/visualization/test_circuit_text_drawer.py
Original file line number Diff line number Diff line change
Expand Up @@ -1399,7 +1399,7 @@ def test_text_synth_no_registerless(self):
)
with self.assertWarnsRegex(
DeprecationWarning,
expected_regex=r"classical_function\(\)`` is deprecated as of Qiskit 1.4",
expected_regex=r"classical_function\(\)`` is deprecated as of qiskit 1.4",
):

@classical_function
Expand Down

0 comments on commit c81ee1a

Please sign in to comment.