Skip to content

Regression

tests.test_model.TestTextfile.test_xml (from pytest)

Failing for the past 1 build (Since Failed#74 )
Took 1 ms.

This test is unclaimed

Error Message

TypeError: stringify() takes 1 positional argument but 2 were given

Stacktrace

self = <test_model.TestTextfile object at 0x7fbb402ac128>
textfile_xml = <cophi.model.Textfile object at 0x7fbb402ac588>
tmpdir = local('/tmp/pytest-of-jenkins/pytest-4/test_xml0')

    def test_xml(self, textfile_xml, tmpdir):
        assert str(textfile_xml.filepath) == str(tmpdir.join("sub", "document.xml"))
        assert textfile_xml.title == "document"
        assert textfile_xml.suffix == ".xml"
        assert textfile_xml.parent == str(tmpdir.join("sub"))
        assert textfile_xml.encoding == "utf-8"
        assert textfile_xml.treat_as == ".xml"
>       assert textfile_xml.content == DOCUMENT

tests/test_model.py:71: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <cophi.model.Textfile object at 0x7fbb402ac588>

    @property
    def content(self):
        """Content of text file.
        """
        if (self.treat_as is None and self.suffix == ".txt") or (self.treat_as == ".txt"):
            return self.filepath.read_text(encoding=self.encoding)
        elif (self.treat_as is None and self.suffix == ".xml") or (self.treat_as == ".xml"):
            tree = self.parse_xml()
>           return self.stringify(tree)
E           TypeError: stringify() takes 1 positional argument but 2 were given

src/cophi/model.py:91: TypeError