def test_carriage_return_splitting(): source = u(dedent(''' "string" class Foo(): pass ''')) source = source.replace('\n', '\r\n') module = parse(source) assert [n.value for lst in module.get_used_names().values() for n in lst] == ['Foo']
def test_unicode_string(): s = tree.String(None, u('bö'), (0, 0)) assert repr(s) # Should not raise an Error!