Skip to content
Myr

Added two xfails

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Armin Ronacher · committed by Armin Ronacher · parent 5112cf9 · Browse files · 1 file+4 added−4 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+4 added−4 removed

  • tests:+4 added−4 removed

1 file+4 added−4 removed

modified:tests/test_utils.py+4 added-4 removed
4 unmodified lines
56import click7import click.utils8import click._termui_impl9from click._compat import WIN9from click._compat import WIN, PY2101112def test_echo(runner):13 with runner.isolation() as out:
1 unmodified line
15 click.echo(b'\x44\x44')16 click.echo(42, nl=False)17 click.echo(b'a', nl=False)18 click.echo('\x1b[31mx\x1b[39m', nl=False)19 bytes = out.getvalue().replace('\r\n', '\n')19 bytes = out.getvalue().replace(b'\r\n', b'\n')20 assert bytes == b'\xe2\x98\x83\nDD\n42ax'2122 # If we are in Python 2, we expect that writing bytes into a string io23 # does not do anything crazy. In Python 3
238 unmodified lines
262 assert result.exception is None263 assert result.output == 'foobar\nmeep\n'264265266@pytest.mark.xfail(WIN and not PY2, reason='God knows ...')267def test_iter_keepopenfile(tmpdir):267268 expected = list(map(str, range(10)))269 p = tmpdir.mkdir('testdir').join('testfile')270 p.write(os.linesep.join(expected))271 f = p.open()272 for e_line, a_line in zip(expected, click.utils.KeepOpenFile(f)):273 assert e_line == a_line.strip()274275276@pytest.mark.xfail(WIN and not PY2, reason='God knows ...')277def test_iter_lazyfile(tmpdir):277278 expected = list(map(str, range(10)))279 p = tmpdir.mkdir('testdir').join('testfile')280 p.write(os.linesep.join(expected))281 f = p.open()
2 unmodified lines