MCPcopy
hub / github.com/pytest-dev/pytest / addinivalue_line

Method addinivalue_line

src/_pytest/config/__init__.py:1668–1674  ·  view source on GitHub ↗

Add a line to a configuration option. The option must have been declared but might not yet be set in which case the line becomes the first line in its value.

(self, name: str, line: str)

Source from the content-addressed store, hash-verified

1666 )
1667
1668 def addinivalue_line(self, name: str, line: str) -> None:
1669 """Add a line to a configuration option. The option must have been
1670 declared but might not yet be set in which case the line becomes
1671 the first line in its value."""
1672 x = self.getini(name)
1673 assert isinstance(x, list)
1674 x.append(line) # modifies the cached list inline
1675
1676 def getini(self, name: str) -> Any:
1677 """Return configuration value the an :ref:`configuration file <configfiles>`.

Callers 7

pytest_configureFunction · 0.80
pytest_configureFunction · 0.80
pytest_configureFunction · 0.80
pytest_configureFunction · 0.80
pytest_configureMethod · 0.80

Calls 2

getiniMethod · 0.95
appendMethod · 0.80

Tested by 3

pytest_configureFunction · 0.64