Exemplo n.º 1
0
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'
Exemplo n.º 2
0
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'
Exemplo n.º 3
0
def test_load_t():
    loader = WebLoader()
    chars = loader.load(SOURCE, 'utf-8', mode='t')
    assert chars.read() == 'id,name\n1,english\n2,中国人\n'
Exemplo n.º 4
0
def test_load_t():
    loader = WebLoader()
    chars = loader.load(SOURCE, 'utf-8', mode='t')
    assert chars.read() == 'id,name\n1,english\n2,中国人\n'