Commit graph

48 commits

Author SHA1 Message Date
Hugo Osvaldo Barrera
78f41d32ce Explicitly close status database
Using `__del__` often closes the database on a different thread, which
is not supported by the sqlite module and produces a different warning.

Explicitly close the status database everywhere it is used.
2025-08-25 17:33:20 +02:00
Hugo Osvaldo Barrera
164559ad7a Remove references to obsolete event_loop fixture
It's gone from the latest pytest-asyncio.
2025-08-25 17:12:21 +02:00
Hugo Osvaldo Barrera
2b4496fea4 Update linting tools 2025-04-07 18:42:07 +02:00
Hugo Osvaldo Barrera
cce8fef8de Auto-format using ruff 2025-04-07 18:40:34 +02:00
Hugo Osvaldo Barrera
a934d5ec66 Keep test for duplicate consecutive keys
See: https://github.com/pimutils/vdirsyncer/pull/1153
2024-12-21 16:49:50 +01:00
Hugo Osvaldo Barrera
688d6f907f Update deprecated usages of hypothesis 2024-12-09 01:30:44 +01:00
Jason Cox
7a387b8efe Require matching BEGIN and END lines in vobjects
Raise an error when parsing a vobject that has mismatched `BEGIN` and
`END` lines (e.g., `BEGIN:FOO` followed by `END:BAR`) or missing `END`
lines (e.g., `BEGIN:FOO` with no subsequent `END:FOO`).

Fixes #1102.
2023-12-13 10:31:32 -05:00
Hugo Osvaldo Barrera
b50f9def00 Ensure type annotations are backwards compatible
Related: https://github.com/pimutils/todoman/issues/544
2023-10-29 16:04:23 +01:00
Hugo Osvaldo Barrera
24cb49f64c Remove superfluous exception parens 2023-02-10 16:57:39 +01:00
Hugo Osvaldo Barrera
b61095ad47 Async fixtures must be marked as such
pytest_asyncio now uses strict mode by default.
2022-09-20 23:01:47 +02:00
pre-commit-ci[bot]
60c3b59552 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2022-03-21 22:41:54 +00:00
Hugo Osvaldo Barrera
fed1ee69c3 Run pyupgrade 2021-08-04 19:58:59 +02:00
Hugo Osvaldo Barrera
7b493416f7
Merge pull request #920 from pimutils/meta_delete
metasync: use None as no-value and delete missing values on syncing
2021-07-26 13:07:45 +02:00
Hugo Osvaldo Barrera
5b8f00e720 Sort imports 2021-07-25 18:35:47 +02:00
Дилян Палаузов
c0ccb3d1aa metasync: use None as no-value and delete missing values on syncing
- change the interface of Storage.get_meta() and .set_meta()
  to use '' as the empty value and None as missing value.

- When a property is missing (e.g calendar-color was removed)
  in the filesystem storage delete the 'color' file, and
  in the WebDAV storage issue propertyupdate/remove call.

- remove the property from [status]/[pair]/[collection].metadata

I have adjusted, but not run the test suite.  On the other side
I tested on real system: source is CalDAV - destination is filesystem;
and source is CalDAV, destination is CalDAV (another account)
2021-07-23 19:07:02 +02:00
Hugo Osvaldo Barrera
1a1f6f0788 Initial async support
Add asyncio to the storage backends and most of the codebase. A lot of
it merely uses asyncio APIs, but still doesn't actually run several
things concurrently internally. Further improvements will be added on
top of these changes

Thanks to  Thomas Grainger (@graingert) for a few useful pointers
related to asyncio.
2021-06-26 13:40:35 +02:00
Hugo Osvaldo Barrera
d2d41e5df1 Use black to auto-format the codebase 2021-05-06 19:28:54 +02:00
Hugo Osvaldo Barrera
fdc12d561c Update tests to work with hypothesis 6 2021-04-07 21:45:41 +02:00
Hugo Osvaldo Barrera
255ea8f9bf This comparison actually does something 2021-04-05 23:28:39 +02:00
Hugo Osvaldo Barrera
b1b4dd92fe Sort imports
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.
2020-06-09 14:34:45 +02:00
Hugo Osvaldo Barrera
9cb1f8d704 Drop support for Python 3.5 and 3.6 2020-06-09 14:33:14 +02:00
Amanda Hickman
c78ec6b3bd Little spelling fix (#695)
* Fixed spelling of "occurred"

* Fix spelling of occurred.

* fixed one lingering misspelling
2020-06-08 19:58:35 +02:00
Hugo Osvaldo Barrera
308289febf Remove python2 leftover code 2020-06-08 18:40:33 +02:00
Hugo Osvaldo Barrera
a26d3bb58c Update hypothesis 2020-06-08 18:40:33 +02:00
Hugo Osvaldo Barrera
7e4a0be674 Upgrade flake8
Update to the latest flake8, and fix all code warnings related to that.
2020-06-08 18:40:31 +02:00
Markus Unterwaditzer
9e3c231cc3 Remove Python 3.3 support (#674)
* Remove Python 3.3 support
2017-10-02 14:38:54 +02:00
Markus Unterwaditzer
1f8d1a0dc5 More tests for sync status 2017-10-01 22:29:33 +02:00
Markus Unterwaditzer
be33fd3ed3 Restructure vdirsyncer.sync 2017-10-01 21:44:14 +02:00
Markus Unterwaditzer
32d1fecbb4 New tests for sync status 2017-10-01 21:44:14 +02:00
Markus Unterwaditzer
cf8e89b5b4 Split up fetchparams tests 2017-10-01 21:44:14 +02:00
Markus Unterwaditzer
0d47e06d89 Add test re #657 2017-08-12 16:46:22 +02:00
Markus Unterwaditzer
56fe38fcdc UID replacement benchmark 2017-07-16 22:17:04 +02:00
Markus Unterwaditzer
b6be4b44de Fix metasync testcase 2017-04-07 12:58:42 +02:00
Markus Unterwaditzer
9a32c34e76 Switch to sqlite for sync status (#611)
* Switch to sqlite for sync status

* Add more info to changelog

* Fix transactions

* Fix transactions more
2017-03-28 10:18:24 +02:00
Markus Unterwaditzer
0e89753757 Use sqlite for sync internally (#609)
See #546
2017-03-27 00:08:23 +02:00
Markus Unterwaditzer
76f794eef3 Module restructuring 2017-02-27 21:19:27 +01:00
Markus Unterwaditzer
96e7c4da37 Fix styling 2017-02-27 00:43:21 +01:00
Markus Unterwaditzer
e457586b29 Fix bug in custom conflict_resolution
Fix #563
2017-02-26 23:24:30 +01:00
Markus Unterwaditzer
7ab6de6f37 More tests 2017-02-11 20:24:55 +01:00
Markus Unterwaditzer
0f2e7e2395 More tests 2017-02-11 20:24:55 +01:00
Markus Unterwaditzer
e54f5b89a3 Makefile: new coverage param 2017-01-30 13:42:01 +01:00
Markus Unterwaditzer
dd465eb909 Don't fail when discovery fails 2017-01-30 12:48:18 +01:00
Markus Unterwaditzer
d454093365 Larger refactor of CLI discovery
Also fix #543
2017-01-29 11:47:47 +01:00
Markus Unterwaditzer
3514d7348c More tests for vobject (#541)
* More tests for vobject

* wip

* wip

* stylefix
2017-01-22 23:46:14 +01:00
Markus Unterwaditzer
9c417248de More tests 2017-01-20 23:05:00 +01:00
Markus Unterwaditzer
0172166510 Stylefix 2017-01-20 21:58:56 +01:00
Markus Unterwaditzer
41794f095d More tests 2017-01-19 22:10:45 +01:00
Markus Unterwaditzer
b2422dbea6 Reorganize testsuite
The end goal here is to independently measure coverage of each of those
testsuites.
2017-01-18 22:42:42 +01:00