diff options
author | drebs <drebs@leap.se> | 2016-09-24 11:32:13 -0300 |
---|---|---|
committer | drebs <drebs@leap.se> | 2016-09-30 09:08:03 -0300 |
commit | d5bbe37495ee733be5f78de72364f3ec48ed7a0d (patch) | |
tree | a23ed57a323bd9e8db088700970d0f6f53e1da91 /testing/tests/sync/test_sync_mutex.py | |
parent | b1a7b538ab851c9e1aab3be5ba31411d658a4773 (diff) |
[test] use pytest tmpdir fixture in all tests
Tests that were imported from u1db or created on top of that structure
were leaving temporary directories behind. This could cause problems in
test servers, either by filling the partition or by extrapolating the
maximum amount of files in a directory.
This commit replaces all usages of temporary directories in the old test
structure by pytest tmpdir fixture, which properly cares for removing
temporary directories.
Diffstat (limited to 'testing/tests/sync/test_sync_mutex.py')
-rw-r--r-- | testing/tests/sync/test_sync_mutex.py | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/testing/tests/sync/test_sync_mutex.py b/testing/tests/sync/test_sync_mutex.py index 261c6485..2626ab2a 100644 --- a/testing/tests/sync/test_sync_mutex.py +++ b/testing/tests/sync/test_sync_mutex.py @@ -24,8 +24,6 @@ be two concurrent synchronization processes at the same time. import time import uuid -import tempfile -import shutil from urlparse import urljoin @@ -91,13 +89,11 @@ class TestSyncMutex( def setUp(self): TestCaseWithServer.setUp(self) CouchDBTestCase.setUp(self) - self.tempdir = tempfile.mkdtemp(prefix="leap_tests-") self.user = ('user-%s' % uuid.uuid4().hex) def tearDown(self): CouchDBTestCase.tearDown(self) TestCaseWithServer.tearDown(self) - shutil.rmtree(self.tempdir) def test_two_concurrent_syncs_do_not_overlap_no_docs(self): self.startServer() |