in testslide/lib.py [0:0]
def _bail_if_private(candidate: str, allow_private: bool) -> None:
if (
candidate.startswith("_")
and not allow_private
and not (candidate.startswith("__") and candidate.endswith("__"))
):
raise ValueError(
"It's disencouraged to patch/mock private interfaces.\n"
"This would result in way too coupled tests and implementation. "
"Please consider using patterns like dependency injection instead. "
"If you really need to do this use the allow_private=True argument."
)