Commit graph

20 commits

Author SHA1 Message Date
Scott Mcdermott
05724a9d21 Make python tests use timezone, py3.12 deprecated tz-less utcnow()
Python upstream is trying to eliminate tz-naive date functions that
imply anything to do with a timezone, even UTC.  They have deprecated
datetime.datetime.utcnow() in Python 3.12 and thus running tests emits
many warnings for us.

We switch to instantiate datetime objects taht are intended to reflect
UTC to have a timezone, or if we instantiate naive ones and then later
convert, we do the full conversion.

After the changes, the tests still work on Python 3.9, but now also on
Python 3.12 without warnings.

See PR description for #632 for more details.

Signed-off-by: Scott Mcdermott <scott@smemsh.net>
2024-09-13 15:45:11 +02:00
Thomas Lauf
29d3043f29 Update copyright ranges
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2021-05-27 21:11:32 +02:00
Thomas Lauf
a2507be7ea Add assertion for interval count
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2021-04-10 23:04:20 +02:00
Shaun Ruffell
fd6d57dbc2 Use json::{encode|decode} for reading / writing JSON.
The JSON library in libshared has functions to esacpe JSON's special
characters, but they are not used by default.

Closes #416
Related to #261

Signed-off-by: Shaun Ruffell <sruffell@sruffell.net>
2021-04-10 22:52:04 +02:00
Shaun Ruffell
b2a8fe6f55 test: Add tests for -1, 0, 1, and 2 'journal.size' settings
Signed-off-by: Shaun Ruffell <sruffell@sruffell.net>
2020-08-10 22:24:52 +02:00
Thomas Lauf
ad58309159 Update Copyright
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2020-04-19 12:41:23 +02:00
Thomas Lauf
7fa7ca5f04 Remove vim annotations
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2019-12-11 10:20:33 +01:00
Thomas Lauf
f53e1cef6d Switch to python 3
- #259

Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2019-12-11 10:20:32 +01:00
Thomas Lauf
8b5a701eeb Require python2 not python2.7 for tests
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2019-06-29 01:31:08 +02:00
Thomas Lauf
712b4b78b2 Revert "Run test with available python"
This reverts commit 6b89e122

Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2019-06-24 21:10:57 +02:00
Thomas Lauf
6b89e12287 Run test with available python
- do not enforce python 2.7

Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
2019-06-22 21:21:11 +02:00
Thomas Lauf
c1ada61a85 Fix undo.t
- resulting interval has union of tags of all joined intervals
2019-02-27 21:26:10 +01:00
Thomas Lauf
481a445a86 Add test for undoing 'timew annotate' 2018-10-12 08:01:13 +02:00
Thomas Lauf
b0193b3683 #9 TI-1: Clean-up
- Remove unused variables
- add empty line for PEP8 conformity
2018-07-24 18:51:00 +02:00
Thomas Lauf
8685a9e2bf #9 TI-1: Add test for undo after consecutive starts 2018-07-24 18:48:35 +02:00
Thomas Lauf
3e17dae695 #9 TI-1: Add test for undo after track with adjust hint 2018-07-24 18:46:55 +02:00
Thomas Lauf
ec5bf9fa26 #9 TI-1: Fix assert message 2018-07-24 18:46:02 +02:00
Thomas Lauf
d230e40313 #9 TI-1: Make undo work with config actions 2018-07-24 18:40:11 +02:00
Thomas Lauf
9d29a14d64 #9 TI-1: Add testsuite
- Simple test for each undoable interval command
- Refactored assertions
2018-07-23 22:15:01 +02:00
Thomas Lauf
2dfc1707b4 #9 TI-1: Add test for undo command 2018-07-19 19:58:16 +02:00