class_docstr: Tests that verify that the cond transform works as expect.
class_docstr_tok: ["Tests","that","verify","that","the","cond","transform","works","as","expect","."]
docstr: Test that an error is raised when the qfunc has a measurement.
docstr_tok: ["Test","that","an","error","is","raised","when","the","qfunc","has","a","measurement","."]
code: def test_cond_error(self, terminal_measurement):
      """Test that an error is raised when the qfunc has a measurement."""
  
      def f():
          return qml.apply(terminal_measurement)
  
      with pytest.raises(
          ConditionalTransformError,
          match="contain no measurements can be applied conditionally",
      ):
          m_0 = qml.measure(1)
          qml.cond(m_0, f)()
  
file_path: pennylane/tests/ops/op_math/test_condition.py
imports: import pytest
  import pennylane
  from pennylane.ops.op_math.condition import ConditionalTransformError
label_desc: Use image node_id 5 for calling the TestCond obj's underlying member method code with example usage: obj.test_cond_error(terminal_measurement) and returns: qml