def test_load_b(): spec = '中国人'.encode('utf-8') loader = WebLoader() chars = loader.load(SOURCE, 'utf-8', mode='b') assert chars.read() == b'id,name\n1,english\n2,' + spec + b'\n'
def test_load_t(): loader = WebLoader() chars = loader.load(SOURCE, 'utf-8', mode='t') assert chars.read() == 'id,name\n1,english\n2,中国人\n'