mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2024-12-21 22:07:51 +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')
|
||||
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")
|
||||
if request.config.getoption('keep', True):
|
||||
print("Will retain tempdir '{}'".format(tmp))
|
||||
if request.config.getoption('keep'):
|
||||
print("\nWill retain tempdir '{}'".format(tmp))
|
||||
|
||||
# I'm leaving this in and always calling it so that the tempdir
|
||||
# path is (also) printed out near the end of the run
|
||||
def cleanup():
|
||||
if request.config.getoption('keep', True):
|
||||
if request.config.getoption('keep'):
|
||||
print("Keeping tempdir '{}'".format(tmp))
|
||||
else:
|
||||
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