mirror of
https://github.com/psycopg/psycopg2.git
synced 2025-10-28 06:21:07 +03:00
return value for partially parsed time values. * psycopg/typecast_mxdatetime.c (typecast_MXDATE_cast): return NULL after setting DataError. Also, don't treat it as an error if typecast_parse_time() returns 0 (as might happen if the remainder of the string is " BC"). * psycopg/typecast_datetime.c (typecast_PYDATE_cast): return NULL after setting DataError. (typecast_PYDATETIME_cast): same here. (typecast_PYTIME_cast): same here. * tests/test_dates.py (CommonDatetimeTestsMixin.test_parse_incomplete_date): test that parsing incomplete date values results in DataError. (CommonDatetimeTestsMixin.test_parse_incomplete_time): same for times. (CommonDatetimeTestsMixin.test_parse_incomplete_time): same for datetimes. |
||
|---|---|---|
| .. | ||
| __init__.py | ||
| bugX000.py | ||
| dbapi20.py | ||
| extras_dictcursor.py | ||
| test_connection.py | ||
| test_dates.py | ||
| test_psycopg2_dbapi20.py | ||
| test_quote.py | ||
| test_transaction.py | ||
| types_basic.py | ||