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

Method mkrel

src/_pytest/terminal.py:1037–1044  ·  view source on GitHub ↗
(nodeid: str)

Source from the content-addressed store, hash-verified

1035 self, nodeid: str, fspath: str, lineno: int | None, domain: str
1036 ) -> str:
1037 def mkrel(nodeid: str) -> str:
1038 line = self.config.cwd_relative_nodeid(nodeid)
1039 if domain and line.endswith(domain):
1040 line = line[: -len(domain)]
1041 values = domain.split("[")
1042 values[0] = values[0].replace(".", "::") # don't replace '.' in params
1043 line += "[".join(values)
1044 return line
1045
1046 # fspath comes from testid which has a "/"-normalized path.
1047 if fspath:

Callers

nothing calls this directly

Calls 3

cwd_relative_nodeidMethod · 0.80
endswithMethod · 0.80
joinMethod · 0.80

Tested by

no test coverage detected