Fix tmp_path example in docs

This commit is contained in:
Bruno Oliveira 2018-10-15 20:17:02 +00:00
parent e4e4fd1e52
commit 39a13d7064
1 changed files with 1 additions and 1 deletions

View File

@ -31,7 +31,7 @@ created in the `base temporary directory`_.
p = d / "hello.txt" p = d / "hello.txt"
p.write_text(CONTENT) p.write_text(CONTENT)
assert p.read_text() == CONTENT assert p.read_text() == CONTENT
assert len(tmpdir.listdir()) == 1 assert len(list(tmp_path.iterdir())) == 1
assert 0 assert 0
Running this would result in a passed test except for the last Running this would result in a passed test except for the last