class_docstr: Test for Magic
  The test counts the number of substitutions that magic.add_code do for
  a few code snippets. The test passes if the expected number of
  substitutions have been made.
class_docstr_tok: ["Test","for","Magic","The","test","counts","the","number","of","substitutions","that","magic.add_code","do","for","a","few","code","snippets",".","The","test","passes","if","the","expected","number","of","substitutions","have","been","made","."]
docstr: Test that magic.displayRootDocString skips/includes docstrings when True/False.
docstr_tok: ["Test","that","magic.displayRootDocString","skips\/includes","docstrings","when","True\/False","."]
code: def test_display_root_docstring_config_option(self):
      """Test that magic.displayRootDocString skips/includes docstrings when True/False."""
  
      CODE = """
  '''This is a top-level docstring'''
  
  'this is a string that should always be magicked'
  
  def my_func():
      '''This is a function docstring'''
  
      'this is a string that should always be magicked'
  
  class MyClass:
      '''This is a class docstring'''
  
      'this is a string that should never be magicked'
  
      def __init__(self):
          '''This is a method docstring'''
  
          'this is a string that should always be magicked'
  """
  
      self._testCode(CODE, 3)
  
      with patch_config_options({"magic.displayRootDocString": True}):
          self._testCode(CODE, 4)
  
      with patch_config_options({"magic.displayRootDocString": False}):
          self._testCode(CODE, 3)
  
imports: import ast
  import unittest
  import streamlit.runtime.scriptrunner.magic
  from tests.testutil import patch_config_options
label_desc: Use image node_id 17 for calling the MagicTest obj's underlying member method code with example usage: obj.test_display_root_docstring_config_option() without return types