Merge pull request #548 from tahoe-lafs/2970.keep-tempdir

Document --keep-tempdir correctly

Fixes: ticket:2970
This commit is contained in:
Jean-Paul Calderone 2019-02-18 09:51:42 -05:00 committed by GitHub
commit 4611e38b01
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 4 deletions

View File

@ -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
View File

@ -0,0 +1 @@
The integration tests now correctly document the `--keep-tempdir` option.