class_docstr: A decorator for test functions and test classes.  When applied
  it will create :class:`MarkInfo` objects which may be
  :ref:`retrieved by hooks as item keywords <excontrolskip>`.
  MarkDecorator instances are often created like this::
  
      mark1 = pytest.mark.NAME              # simple MarkDecorator
      mark2 = pytest.mark.NAME(name1=value) # parametrized MarkDecorator
  
  and can then be applied as decorators to test functions::
  
      @mark2
      def test_function():
          pass
  
  When a MarkDecorator instance is called it does the following:
    1. If called with a single class as its only positional argument and no
       additional keyword arguments, it attaches itself to the class so it
       gets applied automatically to all test cases found in that class.
    2. If called with a single function as its only positional argument and
       no additional keyword arguments, it attaches a MarkInfo object to the
       function, containing all the arguments already stored internally in
       the MarkDecorator.
    3. When called in any other case, it performs a 'fake construction' call,
       i.e. it returns a new MarkDecorator instance with the original
       MarkDecorator's content updated with the arguments passed to this
       call.
  
  Note: The rules above prevent MarkDecorator objects from storing only a
  single function or class reference as their positional argument with no
  additional keyword or positional arguments.
class_docstr_tok: ["A","decorator","for","test","functions","and","test","classes",".","When","applied","it","will","create",":","class",":","`","MarkInfo","`","objects","which","may","be",":","ref",":","`","retrieved","by","hooks","as","item","keywords","<","excontrolskip",">","`",".","MarkDecorator","instances","are","often","created","like","this",":",":","mark1","=","pytest.mark.NAME","#","simple","MarkDecorator","mark2","=","pytest.mark.NAME","(","name1=value",")","#","parametrized","MarkDecorator","and","can","then","be","applied","as","decorators","to","test","functions",":",":","@","mark2","def","test_function","(",")",":","pass","When","a","MarkDecorator","instance","is","called","it","does","the","following",":","1",".","If","called","with","a","single","class","as","its","only","positional","argument","and","no","additional","keyword","arguments",",","it","attaches","itself","to","the","class","so","it","gets","applied","automatically","to","all","test","cases","found","in","that","class",".","2",".","If","called","with","a","single","function","as","its","only","positional","argument","and","no","additional","keyword","arguments",",","it","attaches","a","MarkInfo","object","to","the","function",",","containing","all","the","arguments","already","stored","internally","in","the","MarkDecorator",".","3",".","When","called","in","any","other","case",",","it","performs","a","'fake","construction","'","call",",","i.e",".","it","returns","a","new","MarkDecorator","instance","with","the","original","MarkDecorator","'s","content","updated","with","the","arguments","passed","to","this","call",".","Note",":","The","rules","above","prevent","MarkDecorator","objects","from","storing","only","a","single","function","or","class","reference","as","their","positional","argument","with","no","additional","keyword","or","positional","arguments","."]
code: def __eq__(self, other):
      return (
          self.mark == other.mark
          if isinstance(other, MarkDecorator)
          else False
      )
  
imports: import inspect
  import warnings
  from collections import namedtuple
  from operator import attrgetter
  import attr
  import six
  from ..compat import ascii_escaped
  from ..compat import ATTRS_EQ_FIELD
  from ..compat import getfslineno
  from ..compat import MappingMixin
  from ..compat import NOTSET
  from _pytest.deprecated import PYTEST_PARAM_UNKNOWN_KWARGS
  from _pytest.outcomes import fail
  from _pytest.warning_types import PytestUnknownMarkWarning
label_desc: Use image node_id 2 for calling the MarkDecorator obj's underlying member method code with example usage: obj.__eq__(other) and returns: unknown