mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
test utils: make with_tempdir stackable.
This commit is contained in:
@@ -184,9 +184,9 @@ def gen_with_app(*args, **kwargs):
|
|||||||
|
|
||||||
|
|
||||||
def with_tempdir(func):
|
def with_tempdir(func):
|
||||||
def new_func():
|
def new_func(*args, **kwds):
|
||||||
tempdir = path(tempfile.mkdtemp())
|
tempdir = path(tempfile.mkdtemp())
|
||||||
func(tempdir)
|
func(tempdir, *args, **kwds)
|
||||||
tempdir.rmtree()
|
tempdir.rmtree()
|
||||||
new_func.__name__ = func.__name__
|
new_func.__name__ = func.__name__
|
||||||
return new_func
|
return new_func
|
||||||
|
|||||||
Reference in New Issue
Block a user