You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: doc/en/getting-started.rst
+10-10
Original file line number
Diff line number
Diff line change
@@ -213,35 +213,35 @@ Request a unique temporary directory for functional tests
213
213
214
214
.. code-block:: python
215
215
216
-
# content of test_tmpdir.py
217
-
deftest_needsfiles(tmpdir):
218
-
print(tmpdir)
216
+
# content of test_tmp_path.py
217
+
deftest_needsfiles(tmp_path):
218
+
print(tmp_path)
219
219
assert0
220
220
221
-
List the name ``tmpdir`` in the test function signature and ``pytest`` will lookup and call a fixture factory to create the resource before performing the test function call. Before the test runs, ``pytest`` creates a unique-per-test-invocation temporary directory:
221
+
List the name ``tmp_path`` in the test function signature and ``pytest`` will lookup and call a fixture factory to create the resource before performing the test function call. Before the test runs, ``pytest`` creates a unique-per-test-invocation temporary directory:
0 commit comments