Example #1
0
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,')
Example #2
0
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"')