mirror of
https://github.com/samsonjs/vdirsyncer.git
synced 2026-03-25 08:55:50 +00:00
I don't want to ever have to sort imports again. It's a poor use of developer time. Automate this with a pre-commit hook, and check this on CI. Developers: I suggest you configure your editor to use `reorder_python_imports`. It uses the standard sorting, and detects first/third party libs well.
20 lines
559 B
Python
20 lines
559 B
Python
import pytest
|
|
|
|
from . import StorageTests
|
|
from vdirsyncer.storage.singlefile import SingleFileStorage
|
|
|
|
|
|
class TestSingleFileStorage(StorageTests):
|
|
|
|
storage_class = SingleFileStorage
|
|
supports_metadata = False
|
|
|
|
@pytest.fixture
|
|
def get_storage_args(self, tmpdir):
|
|
def inner(collection='test'):
|
|
rv = {'path': str(tmpdir.join('%s.txt')),
|
|
'collection': collection}
|
|
if collection is not None:
|
|
rv = self.storage_class.create_collection(**rv)
|
|
return rv
|
|
return inner
|