doc: Remove unused imports in examples (#7924)

The "os" imports in the `tmp_path` and `tmpdir` fixture examples are
unused and thus have been removed to prevent confusion.
This commit is contained in:
Emiel van de Laar 2020-10-23 16:31:17 +02:00 committed by GitHub
parent 0cdbf8b377
commit 0d9e27a363
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 0 additions and 5 deletions

View File

@ -20,8 +20,6 @@ created in the `base temporary directory`_.
.. code-block:: python
# content of test_tmp_path.py
import os
CONTENT = "content"
@ -97,9 +95,6 @@ and more. Here is an example test usage:
.. code-block:: python
# content of test_tmpdir.py
import os
def test_create_file(tmpdir):
p = tmpdir.mkdir("sub").join("hello.txt")
p.write("content")