28 lines
551 B
Plaintext
28 lines
551 B
Plaintext
|
|
provide temporary directories to test functions.
|
|
================================================
|
|
|
|
|
|
.. contents::
|
|
:local:
|
|
|
|
usage example::
|
|
|
|
def test_plugin(tmpdir):
|
|
tmpdir.join("hello").write("hello")
|
|
|
|
.. _`py.path.local`: ../../path.html
|
|
|
|
.. _`tmpdir funcarg`:
|
|
|
|
|
|
the 'tmpdir' test function argument
|
|
-----------------------------------
|
|
|
|
return a temporary directory path object
|
|
unique to each test function invocation,
|
|
created as a sub directory of the base temporary
|
|
directory. The returned object is a `py.path.local`_
|
|
path object.
|
|
|