Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
expected = [
{'tag': 'p', 'children': [
{'tag': 'i', 'children': ['A']},
{'tag': 'b', 'children': [' ']},
{'tag': 'b', 'children': [
'B ',
{'tag': 'i', 'children': ['C']},
{'tag': 'i', 'children': [{'tag': 'b'}]},
' D '
]},
'E '
]},
{'tag': 'p', 'children': ['F ']}
]
self.assertEqual(clear_whitespace_nodes(nodes)[0], expected)