示例#1
0
def test_writer_supports_multiple_modes():
    f = StringIO()
    iterable('123', writer(f, 'writelines'))
    f.seek(0)
    result = f.read()
    print result
    assert result == '123'
示例#2
0
def test_writer_supports_multiple_modes():
    f = StringIO()
    iterable('123', writer(f, 'writelines'))
    f.seek(0)
    result = f.read()
    print result
    assert result == '123'
示例#3
0
def test_writer_on_filelike():
    f = StringIO()
    iterable('123', writer(f, 'write'))
    f.seek(0)
    result = f.read()
    assert result == '123'
示例#4
0
def test_writer_on_std_file_descriptors():
    iterable('123', writer(sys.stdout))
示例#5
0
def test_writer_on_filelike():
    f = StringIO()
    iterable('123', writer(f, 'write'))
    f.seek(0)
    result = f.read()
    assert result == '123'
示例#6
0
def test_writer_on_std_file_descriptors():
    iterable('123', writer(sys.stdout))