Skip to content
Myr

Incorrect code example. open with 'write' flag

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

The example doesn't work as is. You need the 'w' flag.

authored by Manu · committed by Manu · parent 85d1121 · Browse files · 1 file+1 added−1 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+1 added−1 removed

  • other:+1 added−1 removed

1 file+1 added−1 removed

modified:docs/testing.rst+1 added-1 removed
56 unmodified lines
57 click.echo(f.read())5859 runner = CliRunner()60 with runner.isolated_filesystem():61 with open('hello.txt') as f:61 with open('hello.txt', 'w') as f:62 f.write('Hello World!')6364 result = runner.invoke(cat, ['hello.txt'])65 assert result.exit_code == 0
25 unmodified lines