Fix last broken test
This commit is contained in:
@@ -569,7 +569,7 @@ class NWConfigParser(ConfigParser):
|
|||||||
# Third Party Code
|
# Third Party Code
|
||||||
# =============================================================================================== #
|
# =============================================================================================== #
|
||||||
|
|
||||||
def xmlIndent(tree, space=" ", level=0):
|
def xmlIndent(tree, space=" ", level=0): # pragma: no cover
|
||||||
"""The XML indent function from CPython, that was only added in Python 3.9.
|
"""The XML indent function from CPython, that was only added in Python 3.9.
|
||||||
It is included here to support older versions of Python.
|
It is included here to support older versions of Python.
|
||||||
https://github.com/python/cpython/blob/main/Lib/xml/etree/ElementTree.py
|
https://github.com/python/cpython/blob/main/Lib/xml/etree/ElementTree.py
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
<entry key="chapter">Chapter %chw%: %title%</entry>
|
<entry key="chapter">Chapter %chw%: %title%</entry>
|
||||||
<entry key="unnumbered">%title%</entry>
|
<entry key="unnumbered">%title%</entry>
|
||||||
<entry key="scene">Scene %ch%.%sc%: %title%</entry>
|
<entry key="scene">Scene %ch%.%sc%: %title%</entry>
|
||||||
<entry key="section"></entry>
|
<entry key="section" />
|
||||||
</titleFormat>
|
</titleFormat>
|
||||||
<status>
|
<status>
|
||||||
<entry key="sf12341" count="4" red="100" green="100" blue="100">New</entry>
|
<entry key="sf12341" count="4" red="100" green="100" blue="100">New</entry>
|
||||||
|
|||||||
@@ -226,7 +226,7 @@ def testCoreProjectXML_ReadCurrent(monkeypatch, tstPaths, fncPath):
|
|||||||
|
|
||||||
# Fail saving
|
# Fail saving
|
||||||
with monkeypatch.context() as mp:
|
with monkeypatch.context() as mp:
|
||||||
mp.setattr("pathlib.Path.write_bytes", causeOSError)
|
mp.setattr("xml.etree.ElementTree.ElementTree.write", causeOSError)
|
||||||
assert xmlWriter.write(data, packedContent, timeStamp, 1000) is False
|
assert xmlWriter.write(data, packedContent, timeStamp, 1000) is False
|
||||||
assert str(xmlWriter.error) == "Mock OSError"
|
assert str(xmlWriter.error) == "Mock OSError"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user