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 one of the qfuncs has a
  measurement.
docstr_tok: ["Test","that","an","error","is","raised","when","one","of","the","qfuncs","has","a","measurement","."]
code: def test_cond_error_else(self, terminal_measurement):
      """Test that an error is raised when one of the qfuncs has a
      measurement."""
  
      def f():
          qml.PauliX(0)
  
      def g():
          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, g)()
  
      with pytest.raises(
          ConditionalTransformError,
          match="contain no measurements can be applied conditionally",
      ):
          m_0 = qml.measure(1)
          qml.cond(m_0, g, 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 6 for calling the TestCond obj's underlying member method code with example usage: obj.test_cond_error_else(terminal_measurement) and returns: qml