// so that pytest-spec will correctly parse the information.
path = os.path.relpath(str(item.fspath))
prefix = parent.__doc__ or getattr(parent, "__name__", parent.__class__.__name__)
suffix = node.__doc__.strip() if node.__doc__ else node.__name__
// Add parametrize or test generation id to distinguish it in output
if item._genid:
suffix += " ({})".format(item._genid)
After Change
// Add parametrize or test generation id to distinguish it in output
// TODO: this is broken with pytest 4.2 (no attribute _genid)
if hasattr(item, "_genid") and item._genid:
suffix += " ({})".format(item._genid)
if prefix or suffix: