| 880 | self.argname = argname |
| 881 | |
| 882 | def toterminal(self, tw: TerminalWriter) -> None: |
| 883 | # tw.line("FixtureLookupError: %s" %(self.argname), red=True) |
| 884 | for tbline in self.tblines: |
| 885 | tw.line(tbline.rstrip()) |
| 886 | lines = self.errorstring.split("\n") |
| 887 | if lines: |
| 888 | tw.line( |
| 889 | f"{FormattedExcinfo.fail_marker} {lines[0].strip()}", |
| 890 | red=True, |
| 891 | ) |
| 892 | for line in lines[1:]: |
| 893 | tw.line( |
| 894 | f"{FormattedExcinfo.flow_marker} {line.strip()}", |
| 895 | red=True, |
| 896 | ) |
| 897 | tw.line() |
| 898 | tw.line("%s:%d" % (os.fspath(self.filename), self.firstlineno + 1)) |
| 899 | |
| 900 | |
| 901 | def fail_fixturefunc(fixturefunc, msg: str) -> "NoReturn": |