diff options
| author | David Bremner <david@tethera.net> | 2022-01-08 17:21:43 -0400 |
|---|---|---|
| committer | David Bremner <david@tethera.net> | 2022-01-09 15:16:51 -0400 |
| commit | 8b737af28bc377db3e661a5744f3b7479b7ce485 (patch) | |
| tree | d229f944b35f60ecc3d0155d06215de10b9bcce1 /bindings/python-cffi/tests/test_database.py | |
| parent | 9e7ea628e6bddbd7345d053a3daf14af74896cc2 (diff) | |
bindings/python-cffi: search for config by default
The previous (pre-0.34.2) constructor searched for a config file but
only if the database path was not specified, and only to retrieve
database.path. Neither of the available options (CONFIG.SEARCH or
CONFIG.NONE) matches this semantics exactly, but CONFIG.SEARCH causes
less breakage for people who relied on the old behaviour to set their
database.path [1]. Since it also seems like the friendlier option in
the long run, this commit switches to CONFIG.SEARCH as default.
This requires a certain amount of updating the pytest tests, but most
users will actually have a config file, unlike the test environment.
[1]: id:87fsqijx7u.fsf@metapensiero.it
Diffstat (limited to 'bindings/python-cffi/tests/test_database.py')
| -rw-r--r-- | bindings/python-cffi/tests/test_database.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/bindings/python-cffi/tests/test_database.py b/bindings/python-cffi/tests/test_database.py index 9b3219c0..f1d12ea6 100644 --- a/bindings/python-cffi/tests/test_database.py +++ b/bindings/python-cffi/tests/test_database.py @@ -13,7 +13,7 @@ import notmuch2._message as message @pytest.fixture def db(maildir): - with dbmod.Database.create(maildir.path) as db: + with dbmod.Database.create(maildir.path, config=notmuch2.Database.CONFIG.EMPTY) as db: yield db @@ -293,7 +293,7 @@ class TestQuery: maildir.deliver(body='baz', headers=[('In-Reply-To', '<{}>'.format(msgid))]) notmuch('new') - with dbmod.Database(maildir.path, 'rw') as db: + with dbmod.Database(maildir.path, 'rw', config=notmuch2.Database.CONFIG.EMPTY) as db: yield db def test_count_messages(self, db): |
