From 70a2d2238e84ea8382bf994f2f79a008dbf5984d Mon Sep 17 00:00:00 2001 From: Daniele Varrazzo Date: Fri, 16 Jun 2017 19:39:18 +0100 Subject: [PATCH] Consider redshift interval supported after further tests --- NEWS | 1 + tests/test_dates.py | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 704c1b0d..271f10b6 100644 --- a/NEWS +++ b/NEWS @@ -19,6 +19,7 @@ What's new in psycopg 2.7.2 - Fixed `~psycopg2.extras.ReplicationCursor.consume_stream()` *keepalive_interval* argument (:ticket:`#547`). - Fixed random `!SystemError` upon receiving abort signal (:ticket:`#551`). +- Parse intervals returned as microseconds from Redshift (:ticket:`#558`). - `~psycopg2.errorcodes` map updated to PostgreSQL 10 beta 1. diff --git a/tests/test_dates.py b/tests/test_dates.py index f2f49f2a..0b790d07 100755 --- a/tests/test_dates.py +++ b/tests/test_dates.py @@ -422,7 +422,9 @@ class DatetimeTests(ConnectingTestCase, CommonDatetimeTestsMixin): from datetime import timedelta for s, v in [ ('0', timedelta(0)), - ('1000000', timedelta(seconds=1)), # Is this a thing? + ('1', timedelta(microseconds=1)), + ('-1', timedelta(microseconds=-1)), + ('1000000', timedelta(seconds=1)), ('86400000000', timedelta(days=1)), ('-86400000000', timedelta(days=-1)), ]: