forked from pool/python-lxml
are flushed to the file (bsc#1206555). OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-lxml?expand=0&rev=170
16 lines
593 B
Diff
16 lines
593 B
Diff
---
|
|
src/lxml/tests/test_etree.py | 2 ++
|
|
1 file changed, 2 insertions(+)
|
|
|
|
--- a/src/lxml/tests/test_etree.py
|
|
+++ b/src/lxml/tests/test_etree.py
|
|
@@ -5278,6 +5278,8 @@ class ETreeWriteTestCase(HelperTestCase)
|
|
tree = self.parse(_bytes('<a>'+'<b/>'*200+'</a>'))
|
|
with tmpfile() as filename:
|
|
tree.write(filename, compression=9)
|
|
+ os.fsync(filename[0])
|
|
+ os.lseek(filename[0], 0, os.SEEK_SET)
|
|
data = etree.tostring(etree.parse(filename))
|
|
self.assertEqual(_bytes('<a>'+'<b/>'*200+'</a>'),
|
|
data)
|