

def test_keep_whitespace(self):
    xml = '<root> </root>'
    self.assertEqual(parse(xml), dict(root=None))
    self.assertEqual(parse(xml, strip_whitespace=False), dict(root=' '))

dataset/ETHPy150Open martinblech/xmltodict/tests/test_xmltodict.py XMLToDictTestCase.test_keep_whitespace/original