File tree Expand file tree Collapse file tree 2 files changed +31
-0
lines changed Expand file tree Collapse file tree 2 files changed +31
-0
lines changed Original file line number Diff line number Diff line change @@ -499,6 +499,32 @@ Each recorded warning is an instance of :class:`warnings.WarningMessage`.
499
499
differently; see :ref: `ensuring_function_triggers `.
500
500
501
501
502
+ tmp_path
503
+ ~~~~~~~~
504
+
505
+ **Tutorial **: :doc: `tmpdir `
506
+
507
+ .. currentmodule :: _pytest.tmpdir
508
+
509
+ .. autofunction :: tmp_path()
510
+ :no-auto-options:
511
+
512
+
513
+ tmp_path_factory
514
+ ~~~~~~~~~~~~~~~~
515
+
516
+ **Tutorial **: :ref: `tmp_path_factory example `
517
+
518
+ .. _`tmp_path_factory factory api` :
519
+
520
+ ``tmp_path_factory `` instances have the following methods:
521
+
522
+ .. currentmodule :: _pytest.tmpdir
523
+
524
+ .. automethod :: TempPathFactory.mktemp
525
+ .. automethod :: TempPathFactory.getbasetemp
526
+
527
+
502
528
tmpdir
503
529
~~~~~~
504
530
Original file line number Diff line number Diff line change @@ -66,6 +66,9 @@ Running this would result in a passed test except for the last
66
66
test_tmp_path.py:13: AssertionError
67
67
========================= 1 failed in 0.12 seconds =========================
68
68
69
+
70
+ .. _`tmp_path_factory example` :
71
+
69
72
The ``tmp_path_factory `` fixture
70
73
--------------------------------
71
74
@@ -77,6 +80,8 @@ to create arbitrary temporary directories from any other fixture or test.
77
80
78
81
It is intended to replace ``tmpdir_factory ``, and returns :class: `pathlib.Path ` instances.
79
82
83
+ See :ref: `tmp_path_factory API <tmp_path_factory factory api >` for details.
84
+
80
85
81
86
The 'tmpdir' fixture
82
87
--------------------
You can’t perform that action at this time.
0 commit comments