From 39a13d70647ae8c7a984209a3424b5b4052efa4f Mon Sep 17 00:00:00 2001 From: Bruno Oliveira Date: Mon, 15 Oct 2018 20:17:02 +0000 Subject: [PATCH] Fix tmp_path example in docs --- doc/en/tmpdir.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/en/tmpdir.rst b/doc/en/tmpdir.rst index 728621152..aff9a9308 100644 --- a/doc/en/tmpdir.rst +++ b/doc/en/tmpdir.rst @@ -31,7 +31,7 @@ created in the `base temporary directory`_. p = d / "hello.txt" p.write_text(CONTENT) assert p.read_text() == CONTENT - assert len(tmpdir.listdir()) == 1 + assert len(list(tmp_path.iterdir())) == 1 assert 0 Running this would result in a passed test except for the last