예제 #1
0
파일: twvcsv.py 프로젝트: apenwarr/wvcsv
def test_dequote():
    WVPASSEQ(wvcsv.dequote(""), None)
    WVPASSEQ(wvcsv.dequote('test'), 'test')
    WVPASSEQ(wvcsv.dequote('"te,st"'), 'te,st')
    WVPASSEQ(wvcsv.dequote('"te,""st"'), 'te,"st')

    WVPASSEQ(wvcsv.dequote(wvcsv.quote('"foo,"bar,')), '"foo,"bar,')
예제 #2
0
파일: twvcsv.py 프로젝트: apenwarr/wvcsv
def test_quote():
    WVPASSEQ(wvcsv.quote(None), "")
    WVPASSEQ(wvcsv.quote("test"), "test")
    WVPASSEQ(wvcsv.quote("t,est"), '"t,est"')
    WVPASSEQ(wvcsv.quote('t,e"st'), '"t,e""st"')