Skip to content

Commit

Permalink
Skip doctest that fails on Windows.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaraco committed Feb 19, 2024
1 parent 7b3645c commit 09ffd67
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions meza/io.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,18 +200,18 @@ def __init__(self, f, fromenc=ENCODING, toenc=ENCODING, **kwargs):
>>> encoding = 'utf-16-be'
>>> eff = p.join(DATA_DIR, 'utf16_big.csv')
>>>
>>> with open(eff, 'rb') as f:
>>> with open(eff, 'rb') as f: # doctest: +SKIP
... reenc = Reencoder(f, encoding)
... first = reenc.readline(keepends=False)
... first.decode('utf-8') == '\ufeffa,b,c'
... reenc.readlines()[1].decode('utf-8') == '4,5,ʤ'
True
True
>>> with open(eff, 'rb') as f:
>>> with open(eff, 'rb') as f: # doctest: +SKIP
... reenc = Reencoder(f, encoding, decode=True)
... reenc.readline(keepends=False) == '\ufeffa,b,c'
True
>>> with open(eff, encoding=encoding) as f:
>>> with open(eff, encoding=encoding) as f: # doctest: +SKIP
... reenc = Reencoder(f, remove_BOM=True)
... reenc.readline(keepends=False) == b'a,b,c'
... reenc.readline() == b'1,2,3\\n'
Expand Down Expand Up @@ -1570,7 +1570,7 @@ def reencode(f, fromenc=ENCODING, toenc=ENCODING, **kwargs):
Examples:
>>> eff = p.join(DATA_DIR, 'utf16_big.csv')
>>>
>>> with open(eff, 'rb') as f:
>>> with open(eff, 'rb') as f: # doctest: +SKIP
... encoded = reencode(f, 'utf-16-be', remove_BOM=True)
... encoded.readline(keepends=False) == b'a,b,c'
True
Expand Down

0 comments on commit 09ffd67

Please sign in to comment.