---
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(''+''*200+''))
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(''+''*200+''),
data)