Esempio 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'
Esempio 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'
Esempio 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'
Esempio 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'