Source: python-py
Version: 1.9.0-2
Severity: important
User: pyt...@packages.debian.org
Usertags: pytest-v6

Hi,

python-py FTBFS with pytest 6 in experimental because of changes to the
use of TerminalWriter. See

    https://docs.pytest.org/en/stable/changelog.html#id60

The error log below has more details.

> __ TestFormattedExcinfo.test_format_excinfo[nofuncargs-nofilter-locals-long] 
> ___
> 
> self = <test_excinfo.TestFormattedExcinfo object at 0x7efeeff62340>
> importasmod = <function TestFormattedExcinfo.importasmod.<locals>.importasmod 
> at 0x7efeef7ed040>
> style = 'long', showlocals = True, tbfilter = False, funcargs = False
> 
>     @pytest.mark.parametrize('style', ("long", "short", "no"))
>     @pytest.mark.parametrize('showlocals', (True, False),
>                              ids=['locals', 'nolocals'])
>     @pytest.mark.parametrize('tbfilter', (True, False),
>                              ids=['tbfilter', 'nofilter'])
>     @pytest.mark.parametrize('funcargs', (True, False),
>                              ids=['funcargs', 'nofuncargs'])
>     def test_format_excinfo(self, importasmod,
>                             style, showlocals, tbfilter, funcargs):
>     
>         mod = importasmod("""
>             def g(x):
>                 raise ValueError(x)
>             def f():
>                 g(3)
>         """)
>         excinfo = py.test.raises(ValueError, mod.f)
>         tw = py.io.TerminalWriter(stringio=True)
>         repr = excinfo.getrepr(
>             style=style,
>             showlocals=showlocals,
>             funcargs=funcargs,
>             tbfilter=tbfilter
>         )
>>       repr.toterminal(tw)
> 
> testing/code/test_excinfo.py:906: 
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
> _ 
> /usr/lib/python3/dist-packages/_pytest/_code/code.py:951: in toterminal
>     element[0].toterminal(tw)
> /usr/lib/python3/dist-packages/_pytest/_code/code.py:981: in toterminal
>     entry.toterminal(tw)
> /usr/lib/python3/dist-packages/_pytest/_code/code.py:1075: in toterminal
>     self._write_entry_lines(tw)
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
> _ 
> 
> self = ReprEntry(lines=['    def raises(  # noqa: F811', '        
> expected_exception: Union["Type[_E]", Tuple["Type[_E]", 
> ......oc=ReprFileLocation(path='/usr/lib/python3/dist-packages/_pytest/python_api.py',
>  lineno=706, message=''), style='long')
> tw = <py._io.terminalwriter.TerminalWriter object at 0x7efeeff62670>
> 
>     def _write_entry_lines(self, tw: TerminalWriter) -> None:
>         """Writes the source code portions of a list of traceback entries 
> with syntax highlighting.
>     
>         Usually entries are lines like these:
>     
>             "     x = 1"
>             ">    assert x == 2"
>             "E    assert 1 == 2"
>     
>         This function takes care of rendering the "source" portions of it 
> (the lines without
>         the "E" prefix) using syntax highlighting, taking care to not 
> highlighting the ">"
>         character, as doing so might break line continuations.
>         """
>     
>         if not self.lines:
>             return
>     
>         # separate indents and source lines that are not failures: we want to
>         # highlight the code but not the indentation, which may contain 
> markers
>         # such as ">   assert 0"
>         fail_marker = "{}   ".format(FormattedExcinfo.fail_marker)
>         indent_size = len(fail_marker)
>         indents = []  # type: List[str]
>         source_lines = []  # type: List[str]
>         failure_lines = []  # type: List[str]
>         for index, line in enumerate(self.lines):
>             is_failure_line = line.startswith(fail_marker)
>             if is_failure_line:
>                 # from this point on all lines are considered part of the 
> failure
>                 failure_lines.extend(self.lines[index:])
>                 break
>             else:
>                 if self.style == "value":
>                     source_lines.append(line)
>                 else:
>                     indents.append(line[:indent_size])
>                     source_lines.append(line[indent_size:])
>     
>>       tw._write_source(source_lines, indents)
> E       AttributeError: 'TerminalWriter' object has no attribute 
> '_write_source'
> 
> /usr/lib/python3/dist-packages/_pytest/_code/code.py:1057: AttributeError
> __ TestFormattedExcinfo.test_format_excinfo[nofuncargs-nofilter-locals-short] 
> __
> 
> self = <test_excinfo.TestFormattedExcinfo object at 0x7efeef65a400>
> importasmod = <function TestFormattedExcinfo.importasmod.<locals>.importasmod 
> at 0x7efeeff00e50>
> style = 'short', showlocals = True, tbfilter = False, funcargs = False
> 
>     @pytest.mark.parametrize('style', ("long", "short", "no"))
>     @pytest.mark.parametrize('showlocals', (True, False),
>                              ids=['locals', 'nolocals'])
>     @pytest.mark.parametrize('tbfilter', (True, False),
>                              ids=['tbfilter', 'nofilter'])
>     @pytest.mark.parametrize('funcargs', (True, False),
>                              ids=['funcargs', 'nofuncargs'])
>     def test_format_excinfo(self, importasmod,
>                             style, showlocals, tbfilter, funcargs):
>     
>         mod = importasmod("""
>             def g(x):
>                 raise ValueError(x)
>             def f():
>                 g(3)
>         """)
>         excinfo = py.test.raises(ValueError, mod.f)
>         tw = py.io.TerminalWriter(stringio=True)
>         repr = excinfo.getrepr(
>             style=style,
>             showlocals=showlocals,
>             funcargs=funcargs,
>             tbfilter=tbfilter
>         )
>>       repr.toterminal(tw)
> 
> testing/code/test_excinfo.py:906: 
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
> _ 
> /usr/lib/python3/dist-packages/_pytest/_code/code.py:951: in toterminal
>     element[0].toterminal(tw)
> /usr/lib/python3/dist-packages/_pytest/_code/code.py:981: in toterminal
>     entry.toterminal(tw)
> /usr/lib/python3/dist-packages/_pytest/_code/code.py:1067: in toterminal
>     self._write_entry_lines(tw)
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
> _ 
> 
> self = ReprEntry(lines=['    func(*args[1:], **kwargs)'], reprfuncargs=None, 
> reprlocals=ReprLocals(lines=['__tracebackhide__ 
> ...eLocation(path='/usr/lib/python3/dist-packages/_pytest/python_api.py', 
> lineno=706, message='in raises'), style='short')
> tw = <py._io.terminalwriter.TerminalWriter object at 0x7efeef65ae80>
> 
>     def _write_entry_lines(self, tw: TerminalWriter) -> None:
>         """Writes the source code portions of a list of traceback entries 
> with syntax highlighting.
>     
>         Usually entries are lines like these:
>     
>             "     x = 1"
>             ">    assert x == 2"
>             "E    assert 1 == 2"
>     
>         This function takes care of rendering the "source" portions of it 
> (the lines without
>         the "E" prefix) using syntax highlighting, taking care to not 
> highlighting the ">"
>         character, as doing so might break line continuations.
>         """
>     
>         if not self.lines:
>             return
>     
>         # separate indents and source lines that are not failures: we want to
>         # highlight the code but not the indentation, which may contain 
> markers
>         # such as ">   assert 0"
>         fail_marker = "{}   ".format(FormattedExcinfo.fail_marker)
>         indent_size = len(fail_marker)
>         indents = []  # type: List[str]
>         source_lines = []  # type: List[str]
>         failure_lines = []  # type: List[str]
>         for index, line in enumerate(self.lines):
>             is_failure_line = line.startswith(fail_marker)
>             if is_failure_line:
>                 # from this point on all lines are considered part of the 
> failure
>                 failure_lines.extend(self.lines[index:])
>                 break
>             else:
>                 if self.style == "value":
>                     source_lines.append(line)
>                 else:
>                     indents.append(line[:indent_size])
>                     source_lines.append(line[indent_size:])
>     
>>       tw._write_source(source_lines, indents)
> E       AttributeError: 'TerminalWriter' object has no attribute 
> '_write_source'
> 
> /usr/lib/python3/dist-packages/_pytest/_code/code.py:1057: AttributeError
> ___ TestFormattedExcinfo.test_format_excinfo[nofuncargs-nofilter-locals-no] 
> ____
> 
> self = <test_excinfo.TestFormattedExcinfo object at 0x7efeefc04c70>
> importasmod = <function TestFormattedExcinfo.importasmod.<locals>.importasmod 
> at 0x7efeeff00dc0>
> style = 'no', showlocals = True, tbfilter = False, funcargs = False
> 
>     @pytest.mark.parametrize('style', ("long", "short", "no"))
>     @pytest.mark.parametrize('showlocals', (True, False),
>                              ids=['locals', 'nolocals'])
>     @pytest.mark.parametrize('tbfilter', (True, False),
>                              ids=['tbfilter', 'nofilter'])
>     @pytest.mark.parametrize('funcargs', (True, False),
>                              ids=['funcargs', 'nofuncargs'])
>     def test_format_excinfo(self, importasmod,
>                             style, showlocals, tbfilter, funcargs):
>     
>         mod = importasmod("""
>             def g(x):
>                 raise ValueError(x)
>             def f():
>                 g(3)
>         """)
>         excinfo = py.test.raises(ValueError, mod.f)
>         tw = py.io.TerminalWriter(stringio=True)
>         repr = excinfo.getrepr(
>             style=style,
>             showlocals=showlocals,
>             funcargs=funcargs,
>             tbfilter=tbfilter
>         )
>>       repr.toterminal(tw)
> 
> testing/code/test_excinfo.py:906: 
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
> _ 
> /usr/lib/python3/dist-packages/_pytest/_code/code.py:951: in toterminal
>     element[0].toterminal(tw)
> /usr/lib/python3/dist-packages/_pytest/_code/code.py:981: in toterminal
>     entry.toterminal(tw)
> /usr/lib/python3/dist-packages/_pytest/_code/code.py:1075: in toterminal
>     self._write_entry_lines(tw)
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
> _ 
> 
> self = ReprEntry(lines=['E   ValueError: 3'], reprfuncargs=None, 
> reprlocals=None, reprfileloc=None, style='no')
> tw = <py._io.terminalwriter.TerminalWriter object at 0x7efeefc04910>
> 
>     def _write_entry_lines(self, tw: TerminalWriter) -> None:
>         """Writes the source code portions of a list of traceback entries 
> with syntax highlighting.
>     
>         Usually entries are lines like these:
>     
>             "     x = 1"
>             ">    assert x == 2"
>             "E    assert 1 == 2"
>     
>         This function takes care of rendering the "source" portions of it 
> (the lines without
>         the "E" prefix) using syntax highlighting, taking care to not 
> highlighting the ">"
>         character, as doing so might break line continuations.
>         """
>     
>         if not self.lines:
>             return
>     
>         # separate indents and source lines that are not failures: we want to
>         # highlight the code but not the indentation, which may contain 
> markers
>         # such as ">   assert 0"
>         fail_marker = "{}   ".format(FormattedExcinfo.fail_marker)
>         indent_size = len(fail_marker)
>         indents = []  # type: List[str]
>         source_lines = []  # type: List[str]
>         failure_lines = []  # type: List[str]
>         for index, line in enumerate(self.lines):
>             is_failure_line = line.startswith(fail_marker)
>             if is_failure_line:
>                 # from this point on all lines are considered part of the 
> failure
>                 failure_lines.extend(self.lines[index:])
>                 break
>             else:
>                 if self.style == "value":
>                     source_lines.append(line)
>                 else:
>                     indents.append(line[:indent_size])
>                     source_lines.append(line[indent_size:])
>     
>>       tw._write_source(source_lines, indents)
> E       AttributeError: 'TerminalWriter' object has no attribute 
> '_write_source'
> 
> /usr/lib/python3/dist-packages/_pytest/_code/code.py:1057: AttributeError
> _ TestFormattedExcinfo.test_format_excinfo[nofuncargs-nofilter-nolocals-long] 
> __
> 
> self = <test_excinfo.TestFormattedExcinfo object at 0x7efeef65a580>
> importasmod = <function TestFormattedExcinfo.importasmod.<locals>.importasmod 
> at 0x7efeefeeb430>
> style = 'long', showlocals = False, tbfilter = False, funcargs = False
> 
>     @pytest.mark.parametrize('style', ("long", "short", "no"))
>     @pytest.mark.parametrize('showlocals', (True, False),
>                              ids=['locals', 'nolocals'])
>     @pytest.mark.parametrize('tbfilter', (True, False),
>                              ids=['tbfilter', 'nofilter'])
>     @pytest.mark.parametrize('funcargs', (True, False),
>                              ids=['funcargs', 'nofuncargs'])
>     def test_format_excinfo(self, importasmod,
>                             style, showlocals, tbfilter, funcargs):
>     
>         mod = importasmod("""
>             def g(x):
>                 raise ValueError(x)
>             def f():
>                 g(3)
>         """)
>         excinfo = py.test.raises(ValueError, mod.f)
>         tw = py.io.TerminalWriter(stringio=True)
>         repr = excinfo.getrepr(
>             style=style,
>             showlocals=showlocals,
>             funcargs=funcargs,
>             tbfilter=tbfilter
>         )
>>       repr.toterminal(tw)
> 
> testing/code/test_excinfo.py:906: 
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
> _ 
> /usr/lib/python3/dist-packages/_pytest/_code/code.py:951: in toterminal
>     element[0].toterminal(tw)
> /usr/lib/python3/dist-packages/_pytest/_code/code.py:981: in toterminal
>     entry.toterminal(tw)
> /usr/lib/python3/dist-packages/_pytest/_code/code.py:1075: in toterminal
>     self._write_entry_lines(tw)
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
> _ 
> 
> self = ReprEntry(lines=['    def raises(  # noqa: F811', '        
> expected_exception: Union["Type[_E]", Tuple["Type[_E]", 
> ......oc=ReprFileLocation(path='/usr/lib/python3/dist-packages/_pytest/python_api.py',
>  lineno=706, message=''), style='long')
> tw = <py._io.terminalwriter.TerminalWriter object at 0x7efeef8892b0>
> 
>     def _write_entry_lines(self, tw: TerminalWriter) -> None:
>         """Writes the source code portions of a list of traceback entries 
> with syntax highlighting.
>     
>         Usually entries are lines like these:
>     
>             "     x = 1"
>             ">    assert x == 2"
>             "E    assert 1 == 2"
>     
>         This function takes care of rendering the "source" portions of it 
> (the lines without
>         the "E" prefix) using syntax highlighting, taking care to not 
> highlighting the ">"
>         character, as doing so might break line continuations.
>         """
>     
>         if not self.lines:
>             return
>     
>         # separate indents and source lines that are not failures: we want to
>         # highlight the code but not the indentation, which may contain 
> markers
>         # such as ">   assert 0"
>         fail_marker = "{}   ".format(FormattedExcinfo.fail_marker)
>         indent_size = len(fail_marker)
>         indents = []  # type: List[str]
>         source_lines = []  # type: List[str]
>         failure_lines = []  # type: List[str]
>         for index, line in enumerate(self.lines):
>             is_failure_line = line.startswith(fail_marker)
>             if is_failure_line:
>                 # from this point on all lines are considered part of the 
> failure
>                 failure_lines.extend(self.lines[index:])
>                 break
>             else:
>                 if self.style == "value":
>                     source_lines.append(line)
>                 else:
>                     indents.append(line[:indent_size])
>                     source_lines.append(line[indent_size:])
>     
>>       tw._write_source(source_lines, indents)
> E       AttributeError: 'TerminalWriter' object has no attribute 
> '_write_source'
> 
> /usr/lib/python3/dist-packages/_pytest/_code/code.py:1057: AttributeError
> _ 
> TestFormattedExcinfo.test_format_excinfo[nofuncargs-nofilter-nolocals-short] _
> 
> self = <test_excinfo.TestFormattedExcinfo object at 0x7efeeff0fca0>
> importasmod = <function TestFormattedExcinfo.importasmod.<locals>.importasmod 
> at 0x7efeeff538b0>
> style = 'short', showlocals = False, tbfilter = False, funcargs = False
> 
>     @pytest.mark.parametrize('style', ("long", "short", "no"))
>     @pytest.mark.parametrize('showlocals', (True, False),
>                              ids=['locals', 'nolocals'])
>     @pytest.mark.parametrize('tbfilter', (True, False),
>                              ids=['tbfilter', 'nofilter'])
>     @pytest.mark.parametrize('funcargs', (True, False),
>                              ids=['funcargs', 'nofuncargs'])
>     def test_format_excinfo(self, importasmod,
>                             style, showlocals, tbfilter, funcargs):
>     
>         mod = importasmod("""
>             def g(x):
>                 raise ValueError(x)
>             def f():
>                 g(3)
>         """)
>         excinfo = py.test.raises(ValueError, mod.f)
>         tw = py.io.TerminalWriter(stringio=True)
>         repr = excinfo.getrepr(
>             style=style,
>             showlocals=showlocals,
>             funcargs=funcargs,
>             tbfilter=tbfilter
>         )
>>       repr.toterminal(tw)
> 
> testing/code/test_excinfo.py:906: 
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
> _ 
> /usr/lib/python3/dist-packages/_pytest/_code/code.py:951: in toterminal
>     element[0].toterminal(tw)
> /usr/lib/python3/dist-packages/_pytest/_code/code.py:981: in toterminal
>     entry.toterminal(tw)
> /usr/lib/python3/dist-packages/_pytest/_code/code.py:1067: in toterminal
>     self._write_entry_lines(tw)
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
> _ 
> 
> self = ReprEntry(lines=['    func(*args[1:], **kwargs)'], reprfuncargs=None, 
> reprlocals=None, 
> reprfileloc=ReprFileLocation(path='/usr/lib/python3/dist-packages/_pytest/python_api.py',
>  lineno=706, message='in raises'), style='short')
> tw = <py._io.terminalwriter.TerminalWriter object at 0x7efeefbf30a0>
> 
>     def _write_entry_lines(self, tw: TerminalWriter) -> None:
>         """Writes the source code portions of a list of traceback entries 
> with syntax highlighting.
>     
>         Usually entries are lines like these:
>     
>             "     x = 1"
>             ">    assert x == 2"
>             "E    assert 1 == 2"
>     
>         This function takes care of rendering the "source" portions of it 
> (the lines without
>         the "E" prefix) using syntax highlighting, taking care to not 
> highlighting the ">"
>         character, as doing so might break line continuations.
>         """
>     
>         if not self.lines:
>             return
>     
>         # separate indents and source lines that are not failures: we want to
>         # highlight the code but not the indentation, which may contain 
> markers
>         # such as ">   assert 0"
>         fail_marker = "{}   ".format(FormattedExcinfo.fail_marker)
>         indent_size = len(fail_marker)
>         indents = []  # type: List[str]
>         source_lines = []  # type: List[str]
>         failure_lines = []  # type: List[str]
>         for index, line in enumerate(self.lines):
>             is_failure_line = line.startswith(fail_marker)
>             if is_failure_line:
>                 # from this point on all lines are considered part of the 
> failure
>                 failure_lines.extend(self.lines[index:])
>                 break
>             else:
>                 if self.style == "value":
>                     source_lines.append(line)
>                 else:
>                     indents.append(line[:indent_size])
>                     source_lines.append(line[indent_size:])
>     
>>       tw._write_source(source_lines, indents)
> E       AttributeError: 'TerminalWriter' object has no attribute 
> '_write_source'
> 
> /usr/lib/python3/dist-packages/_pytest/_code/code.py:1057: AttributeError
> __ TestFormattedExcinfo.test_format_excinfo[nofuncargs-nofilter-nolocals-no] 
> ___
> 
> self = <test_excinfo.TestFormattedExcinfo object at 0x7efeef6ab310>
> importasmod = <function TestFormattedExcinfo.importasmod.<locals>.importasmod 
> at 0x7efeeff53790>
> style = 'no', showlocals = False, tbfilter = False, funcargs = False
> 
>     @pytest.mark.parametrize('style', ("long", "short", "no"))
>     @pytest.mark.parametrize('showlocals', (True, False),
>                              ids=['locals', 'nolocals'])
>     @pytest.mark.parametrize('tbfilter', (True, False),
>                              ids=['tbfilter', 'nofilter'])
>     @pytest.mark.parametrize('funcargs', (True, False),
>                              ids=['funcargs', 'nofuncargs'])
>     def test_format_excinfo(self, importasmod,
>                             style, showlocals, tbfilter, funcargs):
>     
>         mod = importasmod("""
>             def g(x):
>                 raise ValueError(x)
>             def f():
>                 g(3)
>         """)
>         excinfo = py.test.raises(ValueError, mod.f)
>         tw = py.io.TerminalWriter(stringio=True)
>         repr = excinfo.getrepr(
>             style=style,
>             showlocals=showlocals,
>             funcargs=funcargs,
>             tbfilter=tbfilter
>         )
>>       repr.toterminal(tw)
> 
> testing/code/test_excinfo.py:906: 
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
> _ 
> /usr/lib/python3/dist-packages/_pytest/_code/code.py:951: in toterminal
>     element[0].toterminal(tw)
> /usr/lib/python3/dist-packages/_pytest/_code/code.py:981: in toterminal
>     entry.toterminal(tw)
> /usr/lib/python3/dist-packages/_pytest/_code/code.py:1075: in toterminal
>     self._write_entry_lines(tw)
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
> _ 
> 
> self = ReprEntry(lines=['E   ValueError: 3'], reprfuncargs=None, 
> reprlocals=None, reprfileloc=None, style='no')
> tw = <py._io.terminalwriter.TerminalWriter object at 0x7efeef6abd60>
> 
>     def _write_entry_lines(self, tw: TerminalWriter) -> None:
>         """Writes the source code portions of a list of traceback entries 
> with syntax highlighting.
>     
>         Usually entries are lines like these:
>     
>             "     x = 1"
>             ">    assert x == 2"
>             "E    assert 1 == 2"
>     
>         This function takes care of rendering the "source" portions of it 
> (the lines without
>         the "E" prefix) using syntax highlighting, taking care to not 
> highlighting the ">"
>         character, as doing so might break line continuations.
>         """
>     
>         if not self.lines:
>             return
>     
>         # separate indents and source lines that are not failures: we want to
>         # highlight the code but not the indentation, which may contain 
> markers
>         # such as ">   assert 0"
>         fail_marker = "{}   ".format(FormattedExcinfo.fail_marker)
>         indent_size = len(fail_marker)
>         indents = []  # type: List[str]
>         source_lines = []  # type: List[str]
>         failure_lines = []  # type: List[str]
>         for index, line in enumerate(self.lines):
>             is_failure_line = line.startswith(fail_marker)
>             if is_failure_line:
>                 # from this point on all lines are considered part of the 
> failure
>                 failure_lines.extend(self.lines[index:])
>                 break
>             else:
>                 if self.style == "value":
>                     source_lines.append(line)
>                 else:
>                     indents.append(line[:indent_size])
>                     source_lines.append(line[indent_size:])
>     
>>       tw._write_source(source_lines, indents)
> E       AttributeError: 'TerminalWriter' object has no attribute 
> '_write_source'
> 
> /usr/lib/python3/dist-packages/_pytest/_code/code.py:1057: AttributeError
> =============================== warnings summary 
> ===============================
> /usr/lib/python3/dist-packages/_pytest/config/__init__.py:1148
>   /usr/lib/python3/dist-packages/_pytest/config/__init__.py:1148: 
> PytestConfigWarning: Unknown config ini key: rsyncdirs
>   
>     self._warn_or_fail_if_strict("Unknown config ini key: {}\n".format(key))
> 
> testing/code/test_source.py:8
>   /<<PKGBUILDDIR>>/testing/code/test_source.py:8: PytestUnknownMarkWarning: 
> Unknown pytest.mark.nothing - is this a typo?  You can register custom marks 
> to avoid this warning - for details, see 
> https://docs.pytest.org/en/stable/mark.html
>     astonly = py.test.mark.nothing
> 
> testing/code/test_source.py:282
>   testing/code/test_source.py:282: PytestCollectionWarning: yield tests were 
> removed in pytest 4.0 - test_compilefuncs_and_path_sanity will be ignored
>     def test_compilefuncs_and_path_sanity(self):
> 
> testing/code/test_source.py::test_isparseable
>   /<<PKGBUILDDIR>>/py/_code/source.py:137: DeprecationWarning: The parser 
> module is deprecated and will be removed in future versions of Python
>     import parser
> 
> testing/path/test_local.py::TestExecution::test_sysfind_no_permisson_ignored
>   /<<PKGBUILDDIR>>/testing/path/test_local.py:428: PytestWarning: Value of 
> environment variable PATH type should be str, but got 
> local('/tmp/pytest-of-christian/pytest-0/test_sysfind_no_permisson_igno0/noperm')
>  (type: LocalPath); converted to str implicitly
>     monkeypatch.setenv("PATH", noperm, prepend=":")
> 
> testing/root/test_py_imports.py::test_dir[std]
>   /<<PKGBUILDDIR>>/testing/root/test_py_imports.py:8: 
> PyStdIsDeprecatedWarning: py.std is deprecated, please import __map__ directly
>     if hasattr(obj, '__map__'):  # isinstance(obj, Module):
> 
> testing/root/test_std.py::test_import_error_converts_to_attributeerror
>   /<<PKGBUILDDIR>>/testing/root/test_std.py:10: PyStdIsDeprecatedWarning: 
> py.std is deprecated, please import xyzalskdj directly
>     py.std.xyzalskdj
> 
> -- Docs: https://docs.pytest.org/en/stable/warnings.html
> =========================== short test summary info 
> ============================
> SKIPPED [2] testing/code/test_assertion.py:164: could not import 
> 'py._code._assertionold': No module named 'compiler'
> SKIPPED [1] testing/code/test_excinfo.py:204: could not import 'decorator': 
> No module named 'decorator'
> SKIPPED [1] testing/code/test_excinfo.py:316: could not import 'jinja2': No 
> module named 'jinja2'
> SKIPPED [3] testing/io_/test_capture.py:119: could not run 'lsof'
> SKIPPED [4] testing/io_/test_capture.py:241: text output different for bytes 
> on python3
> SKIPPED [1] testing/io_/test_terminalwriter_linewidth.py:36: Bytes are not 
> accepted https://github.com/pytest-dev/pytest/issues/4861
> SKIPPED [3] testing/path/common.py:448: sys.version_info < (3,6)
> SKIPPED [3] testing/path/common.py:453: sys.version_info < (3,6)
> SKIPPED [1] testing/path/test_local.py:167: case insensitive only on windows
> SKIPPED [1] testing/path/test_local.py:190: only with Python 3 before 3.5
> SKIPPED [1] testing/path/test_local.py:415: condition: not (sys.platform == 
> 'win32' or getattr(os, '_name', None) == 'nt')
> SKIPPED [1] testing/path/test_local.py:743: condition: not (sys.platform == 
> 'win32' or getattr(os, '_name', None) == 'nt')
> SKIPPED [1] testing/path/test_local.py:747: condition: not (sys.platform == 
> 'win32' or getattr(os, '_name', None) == 'nt')
> SKIPPED [1] testing/path/test_local.py:760: condition: not (sys.platform == 
> 'win32' or getattr(os, '_name', None) == 'nt')
> SKIPPED [1] testing/path/test_local.py:766: condition: not (sys.platform == 
> 'win32' or getattr(os, '_name', None) == 'nt')
> SKIPPED [1] testing/path/test_local.py:771: condition: not (sys.platform == 
> 'win32' or getattr(os, '_name', None) == 'nt')
> SKIPPED [1] testing/path/test_local.py:779: condition: not (sys.platform == 
> 'win32' or getattr(os, '_name', None) == 'nt')
> SKIPPED [1] testing/path/test_local.py:786: condition: not (sys.platform == 
> 'win32' or getattr(os, '_name', None) == 'nt')
> SKIPPED [11] testing/path/test_svnauth.py:274: use --runslowtests to run 
> these tests
> XFAIL testing/code/test_assertion.py::test_assert_with_brokenrepr_arg
>   reason: [NOTRUN] broken on modern pytest
> XFAIL testing/code/test_assertion.py::test_assert_raise_subclass
>   reason: [NOTRUN] broken on modern pytest
> XFAIL 
> testing/code/test_excinfo.py::TestFormattedExcinfo::test_repr_source_excinfo
>   reason: [NOTRUN] this test hasn't been fixed after moving py.code into 
> pytest
> XFAIL 
> testing/code/test_excinfo.py::TestFormattedExcinfo::test_repr_excinfo_addouterr
>   reason: [NOTRUN] this test hasn't been fixed after moving py.code into 
> pytest
> XFAIL 
> testing/code/test_excinfo.py::TestFormattedExcinfo::test_tb_entry_AssertionError
>   reason: [NOTRUN] this test hasn't been fixed after moving py.code into 
> pytest
> XFAIL testing/code/test_excinfo.py::TestFormattedExcinfo::test_toterminal_long
>   reason: [NOTRUN] this test hasn't been fixed after moving py.code into 
> pytest
> XFAIL 
> testing/code/test_excinfo.py::TestFormattedExcinfo::test_toterminal_long_missing_source
>   reason: [NOTRUN] this test hasn't been fixed after moving py.code into 
> pytest
> XFAIL 
> testing/code/test_excinfo.py::TestFormattedExcinfo::test_toterminal_long_incomplete_source
>   reason: [NOTRUN] this test hasn't been fixed after moving py.code into 
> pytest
> XFAIL 
> testing/code/test_excinfo.py::TestFormattedExcinfo::test_toterminal_long_filenames
>   reason: [NOTRUN] this test hasn't been fixed after moving py.code into 
> pytest
> XFAIL testing/code/test_excinfo.py::TestFormattedExcinfo::test_native_style
>   reason: [NOTRUN] this test hasn't been fixed after moving py.code into 
> pytest
> XFAIL 
> testing/code/test_excinfo.py::TestFormattedExcinfo::test_traceback_repr_style
>   reason: [NOTRUN] this test hasn't been fixed after moving py.code into 
> pytest
> XFAIL 
> testing/code/test_source.py::TestSourceParsingAndCompiling::test_compilefuncs_and_path_sanity
>   reason: [NOTRUN] yield tests were removed in pytest 4.0 - 
> test_compilefuncs_and_path_sanity will be ignored
> XFAIL testing/path/test_local.py::TestLocalPath::test_long_filenames
>   reason: [NOTRUN] unreliable est for long filenames
> XFAIL testing/path/test_local.py::TestUnicodePy2Py3::test_read_write
>   changing read/write might break existing usages
> XFAIL testing/path/test_svnurl.py::TestSvnURLCommandPath::test_load
> XFAIL testing/path/test_svnwc.py::TestWCSvnCommandPath::test_status_update
>   reason: svn-1.7 has buggy 'status --xml' output
> FAILED testing/code/test_excinfo.py::test_excinfo_repr - AssertionError: 
> asse...
> FAILED testing/code/test_excinfo.py::test_excinfo_str - AssertionError: 
> asser...
> FAILED 
> testing/code/test_excinfo.py::TestFormattedExcinfo::test_format_excinfo[funcargs-tbfilter-locals-long]
> FAILED 
> testing/code/test_excinfo.py::TestFormattedExcinfo::test_format_excinfo[funcargs-tbfilter-locals-short]
> FAILED 
> testing/code/test_excinfo.py::TestFormattedExcinfo::test_format_excinfo[funcargs-tbfilter-locals-no]
> FAILED 
> testing/code/test_excinfo.py::TestFormattedExcinfo::test_format_excinfo[funcargs-tbfilter-nolocals-long]
> FAILED 
> testing/code/test_excinfo.py::TestFormattedExcinfo::test_format_excinfo[funcargs-tbfilter-nolocals-short]
> FAILED 
> testing/code/test_excinfo.py::TestFormattedExcinfo::test_format_excinfo[funcargs-tbfilter-nolocals-no]
> FAILED 
> testing/code/test_excinfo.py::TestFormattedExcinfo::test_format_excinfo[funcargs-nofilter-locals-long]
> FAILED 
> testing/code/test_excinfo.py::TestFormattedExcinfo::test_format_excinfo[funcargs-nofilter-locals-short]
> FAILED 
> testing/code/test_excinfo.py::TestFormattedExcinfo::test_format_excinfo[funcargs-nofilter-locals-no]
> FAILED 
> testing/code/test_excinfo.py::TestFormattedExcinfo::test_format_excinfo[funcargs-nofilter-nolocals-long]
> FAILED 
> testing/code/test_excinfo.py::TestFormattedExcinfo::test_format_excinfo[funcargs-nofilter-nolocals-short]
> FAILED 
> testing/code/test_excinfo.py::TestFormattedExcinfo::test_format_excinfo[funcargs-nofilter-nolocals-no]
> FAILED 
> testing/code/test_excinfo.py::TestFormattedExcinfo::test_format_excinfo[nofuncargs-tbfilter-locals-long]
> FAILED 
> testing/code/test_excinfo.py::TestFormattedExcinfo::test_format_excinfo[nofuncargs-tbfilter-locals-short]
> FAILED 
> testing/code/test_excinfo.py::TestFormattedExcinfo::test_format_excinfo[nofuncargs-tbfilter-locals-no]
> FAILED 
> testing/code/test_excinfo.py::TestFormattedExcinfo::test_format_excinfo[nofuncargs-tbfilter-nolocals-long]
> FAILED 
> testing/code/test_excinfo.py::TestFormattedExcinfo::test_format_excinfo[nofuncargs-tbfilter-nolocals-short]
> FAILED 
> testing/code/test_excinfo.py::TestFormattedExcinfo::test_format_excinfo[nofuncargs-tbfilter-nolocals-no]
> FAILED 
> testing/code/test_excinfo.py::TestFormattedExcinfo::test_format_excinfo[nofuncargs-nofilter-locals-long]
> FAILED 
> testing/code/test_excinfo.py::TestFormattedExcinfo::test_format_excinfo[nofuncargs-nofilter-locals-short]
> FAILED 
> testing/code/test_excinfo.py::TestFormattedExcinfo::test_format_excinfo[nofuncargs-nofilter-locals-no]
> FAILED 
> testing/code/test_excinfo.py::TestFormattedExcinfo::test_format_excinfo[nofuncargs-nofilter-nolocals-long]
> FAILED 
> testing/code/test_excinfo.py::TestFormattedExcinfo::test_format_excinfo[nofuncargs-nofilter-nolocals-short]
> FAILED 
> testing/code/test_excinfo.py::TestFormattedExcinfo::test_format_excinfo[nofuncargs-nofilter-nolocals-no]
> ===== 26 failed, 774 passed, 39 skipped, 16 xfailed, 7 warnings in 19.15s 
> ======
> E: pybuild pybuild:353: test: plugin custom failed with: exit code=1: 
> python3.9 -m pytest testing 
> --ignore=/<<PKGBUILDDIR>>/testing/log/test_warning.py
> dh_auto_test: error: pybuild --test --test-pytest -i python{version} -p 3.9 
> returned exit code 13
> make[1]: Leaving directory '/<<PKGBUILDDIR>>'
> make[1]: *** [debian/rules:10: override_dh_auto_test] Error 25
> make: *** [debian/rules:6: binary] Error 2
> dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 
> 2

Reply via email to