class_docstr: Test the max_length keyword.
docstr: Test that setting a maximal length works as expected.
docstr_tok: ["Test","that","setting","a","maximal","length","works","as","expected","."]
code: def test_setting_max_length(self, ml):
      """Test that setting a maximal length works as expected."""
  
      @qml.qnode(qml.device("default.qubit", wires=1))
      def long_circuit():
          for _ in range(10):
              qml.PauliX(0)
          return [qml.expval(qml.PauliZ(0)) for _ in range(4)]
  
      out = draw(long_circuit, max_length=ml)()
      assert max(len(s) for s in out.split("\n")) <= ml
  
imports: from functools import partial
  import pytest
  import pennylane
  from pennylane import numpy
  from pennylane.drawer import draw
label_desc: Use image node_id 2 for calling the TestMaxLength obj's underlying member method code with example usage: obj.test_setting_max_length(ml) and returns: unknown