'http://bugs.python.org/issue14720
The microsecond parsing of convert_timestamp() should pad with zeros,
since the microsecond string "456" actually represents "456000".'

def CheckConvertTimestampMicrosecondPadding(self):

    con = sqlite.connect(':memory:', detect_types=sqlite.PARSE_DECLTYPES)
    cur = con.cursor()
    cur.execute('CREATE    TABLE    t    (x    TIMESTAMP)')
    cur.execute("INSERT    INTO    t    (x)    VALUES    ('2012-04-04    15:06:00.456')")
    cur.execute("INSERT    INTO    t    (x)    VALUES    ('2012-04-04    15:06:00.123456789')")
    cur.execute('SELECT    *    FROM    t')
    values = [x[0] for x in cur.fetchall()]
    self.assertEqual(values, [datetime.datetime(2012, 4, 4, 15, 6, 0, 456000), datetime.datetime(2012, 4, 4, 15, 6, 0, 123456)])
