tests: name temp test dir after test function that used it

This commit is contained in:
Hans-Christoph Steiner 2017-11-30 09:59:02 +01:00
parent 30b2f5a48a
commit 3ff4b656c6
3 changed files with 9 additions and 10 deletions

View file

@ -32,8 +32,7 @@ class LintTest(unittest.TestCase):
self.assertTrue(fdroidserver.lint.check_for_unsupported_metadata_files())
tmpdir = os.path.join(localmodule, '.testfiles')
tmptestsdir = tempfile.mkdtemp(prefix='test_check_for_unsupported_metadata_files-',
dir=tmpdir)
tmptestsdir = tempfile.mkdtemp(prefix=inspect.currentframe().f_code.co_name, dir=tmpdir)
self.assertFalse(fdroidserver.lint.check_for_unsupported_metadata_files(tmptestsdir + '/'))
shutil.copytree(os.path.join(localmodule, 'tests', 'metadata'),
os.path.join(tmptestsdir, 'metadata'),