MCPcopy Create free account
hub / github.com/pytest-dev/pytest / makefile

Method makefile

src/_pytest/legacypath.py:95–105  ·  view source on GitHub ↗

See :meth:`Pytester.makefile`.

(self, ext, *args, **kwargs)

Source from the content-addressed store, hash-verified

93 return self._pytester._finalize()
94
95 def makefile(self, ext, *args, **kwargs) -> LEGACY_PATH:
96 """See :meth:`Pytester.makefile`."""
97 if ext and not ext.startswith("."):
98 # pytester.makefile is going to throw a ValueError in a way that
99 # testdir.makefile did not, because
100 # pathlib.Path is stricter suffixes than py.path
101 # This ext arguments is likely user error, but since testdir has
102 # allowed this, we will prepend "." as a workaround to avoid breaking
103 # testdir usage that worked before
104 ext = "." + ext
105 return legacy_path(self._pytester.makefile(ext, *args, **kwargs))
106
107 def makeconftest(self, source) -> LEGACY_PATH:
108 """See :meth:`Pytester.makeconftest`."""

Callers

nothing calls this directly

Calls 1

legacy_pathFunction · 0.90

Tested by

no test coverage detected