From 1ed16c8265d6b5ee68ad9006adb2b2eb2deb2639 Mon Sep 17 00:00:00 2001 From: Federico Di Gregorio Date: Wed, 19 Sep 2007 13:40:18 +0000 Subject: [PATCH] Added test for DateTime object allocation bug. --- tests/bugX000.py | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 tests/bugX000.py diff --git a/tests/bugX000.py b/tests/bugX000.py new file mode 100644 index 00000000..486d3201 --- /dev/null +++ b/tests/bugX000.py @@ -0,0 +1,10 @@ +import psycopg2 +import time + +d1 = psycopg2.Date(2002,12,25) +d2 = psycopg2.DateFromTicks(time.mktime((2002,12,25,0,0,0,0,0,0))) +t1 = psycopg2.Time(13,45,30) +t2 = psycopg2.TimeFromTicks(time.mktime((2001,1,1,13,45,30,0,0,0))) +t1 = psycopg2.Timestamp(2002,12,25,13,45,30) +t2 = psycopg2.TimestampFromTicks( time.mktime((2002,12,25,13,45,30,0,0,0))) +