def _dsl_print()

in testslide/runner.py [0:0]


    def _dsl_print(self, example: Example, description: str, code: Callable) -> None:
        lineno: Union[str, int]
        if not self.dsl_debug:  # type: ignore
            return
        name = code.__name__
        try:
            file = inspect.getsourcefile(code)
        except TypeError:
            try:
                file = inspect.getfile(code)
            except TypeError:
                file = "?"
        if file and file.startswith(os.path.dirname(__file__)):
            return
        if self.trim_path_prefix:  # type: ignore
            split = file.split(self.trim_path_prefix)  # type: ignore
            if len(split) == 2 and not split[0]:
                file = split[1]
        try:
            _lines, lineno = inspect.getsourcelines(code)
        except OSError:
            lineno = "?"
        self.print_cyan(  # type: ignore
            "{indent}{description}: {name} @ {file_lineno}".format(
                indent=self.get_dsl_debug_indent(example),
                description=description,
                name=name,
                file_lineno=f"{file}:{lineno}",
            )
        )