diff options
author | Bruno Oliveira <nicoddemus@gmail.com> | 2017-05-15 20:25:53 -0300 |
---|---|---|
committer | Bruno Oliveira <nicoddemus@gmail.com> | 2017-05-15 21:57:04 -0300 |
commit | 00e7ee532e1f692d508a2cb9241f4b78921f6f4c (patch) | |
tree | 80f53d2a2484a17dafcf241f4ffdd914be134134 /doc/en/unittest.rst | |
parent | fe49c78f322dadb4d10303f4783b9452c2f60a1e (diff) | |
download | pytest-00e7ee532e1f692d508a2cb9241f4b78921f6f4c.tar.gz |
Fix minor regendoc issues
Diffstat (limited to 'doc/en/unittest.rst')
-rw-r--r-- | doc/en/unittest.rst | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/doc/en/unittest.rst b/doc/en/unittest.rst index 6ee7d505e..436e64e07 100644 --- a/doc/en/unittest.rst +++ b/doc/en/unittest.rst @@ -171,7 +171,8 @@ creation of a per-test temporary directory:: tmpdir.join("samplefile.ini").write("# testdata") def test_method(self): - s = open("samplefile.ini").read() + with open("samplefile.ini") as f: + s = f.read() assert "testdata" in s Due to the ``autouse`` flag the ``initdir`` fixture function will be |