mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2024-12-23 14:52:26 +00:00
Merge pull request #548 from tahoe-lafs/2970.keep-tempdir
Document --keep-tempdir correctly Fixes: ticket:2970
This commit is contained in:
commit
4611e38b01
@ -54,16 +54,16 @@ def reactor():
|
|||||||
@pytest.fixture(scope='session')
|
@pytest.fixture(scope='session')
|
||||||
def temp_dir(request):
|
def temp_dir(request):
|
||||||
"""
|
"""
|
||||||
Invoke like 'py.test --keep ...' to avoid deleting the temp-dir
|
Invoke like 'py.test --keep-tempdir ...' to avoid deleting the temp-dir
|
||||||
"""
|
"""
|
||||||
tmp = mkdtemp(prefix="tahoe")
|
tmp = mkdtemp(prefix="tahoe")
|
||||||
if request.config.getoption('keep', True):
|
if request.config.getoption('keep'):
|
||||||
print("Will retain tempdir '{}'".format(tmp))
|
print("\nWill retain tempdir '{}'".format(tmp))
|
||||||
|
|
||||||
# I'm leaving this in and always calling it so that the tempdir
|
# I'm leaving this in and always calling it so that the tempdir
|
||||||
# path is (also) printed out near the end of the run
|
# path is (also) printed out near the end of the run
|
||||||
def cleanup():
|
def cleanup():
|
||||||
if request.config.getoption('keep', True):
|
if request.config.getoption('keep'):
|
||||||
print("Keeping tempdir '{}'".format(tmp))
|
print("Keeping tempdir '{}'".format(tmp))
|
||||||
else:
|
else:
|
||||||
try:
|
try:
|
||||||
|
1
newsfragments/2970.other
Normal file
1
newsfragments/2970.other
Normal file
@ -0,0 +1 @@
|
|||||||
|
The integration tests now correctly document the `--keep-tempdir` option.
|
Loading…
Reference in New Issue
Block a user