diff --git a/Lib/test/test_minidom.py b/Lib/test/test_minidom.py
index 002b03670cb..457480349a4 100644
--- a/Lib/test/test_minidom.py
+++ b/Lib/test/test_minidom.py
@@ -272,7 +272,7 @@ def testAttributeRepr():
def testTextNodeRepr(): pass
def testWriteXML():
- str = ''
+ str = '\n'
dom = parseString(str)
domstr = dom.toxml()
dom.unlink()