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:
parent
0cdbf8b377
commit
0d9e27a363
|
@ -20,8 +20,6 @@ created in the `base temporary directory`_.
|
||||||
.. code-block:: python
|
.. code-block:: python
|
||||||
|
|
||||||
# content of test_tmp_path.py
|
# content of test_tmp_path.py
|
||||||
import os
|
|
||||||
|
|
||||||
CONTENT = "content"
|
CONTENT = "content"
|
||||||
|
|
||||||
|
|
||||||
|
@ -97,9 +95,6 @@ and more. Here is an example test usage:
|
||||||
.. code-block:: python
|
.. code-block:: python
|
||||||
|
|
||||||
# content of test_tmpdir.py
|
# content of test_tmpdir.py
|
||||||
import os
|
|
||||||
|
|
||||||
|
|
||||||
def test_create_file(tmpdir):
|
def test_create_file(tmpdir):
|
||||||
p = tmpdir.mkdir("sub").join("hello.txt")
|
p = tmpdir.mkdir("sub").join("hello.txt")
|
||||||
p.write("content")
|
p.write("content")
|
||||||
|
|
Loading…
Reference in New Issue