psycopg2/tests
Greg Ward 53c1607644 Always raise OperationalError when connection was closed externally.
From the DB-API (https://www.python.org/dev/peps/pep-0249/):

  OperationalError

  Exception raised for errors that are related to the database's
  operation and not necessarily under the control of the programmer,
  e.g. an unexpected disconnect occurs, [...]

Additionally, psycopg2 was inconsistent, at least in the async case:
depending on how the "connection closed" error was reported from the
kernel to libpq, it would sometimes raise OperationalError and
sometimes DatabaseError. Now it always raises OperationalError.
2016-06-28 18:03:05 -04:00
..
__init__.py Fixed race condition on import in errorcodes.lookup 2015-12-16 12:00:52 +00:00
dbapi20_tpc.py hook up two phase commit tests. 2010-11-05 09:34:47 +00:00
dbapi20.py Fix several typos 2015-05-03 10:00:11 +01:00
test_async.py Added select.select timeout on AsyncTests.wait 2014-05-19 12:15:52 +01:00
test_bug_gc.py Testing boilerplate unified in a single base class 2013-04-07 00:23:30 +01:00
test_bugX000.py All unit test modules have a test_ prefix 2011-10-19 02:20:43 +01:00
test_cancel.py Testing boilerplate unified in a single base class 2013-04-07 00:23:30 +01:00
test_connection.py Report NotSupportedError for PGRES_COPY_BOTH and PGRES_SINGLE_TUPLE 2015-09-30 12:24:47 +01:00
test_copy.py Propagate read error messages in COPY FROM 2015-02-08 01:42:21 +00:00
test_cursor.py Always raise OperationalError when connection was closed externally. 2016-06-28 18:03:05 -04:00
test_dates.py More tests tweaks 2015-02-08 12:51:36 +00:00
test_errcodes.py Fixed race condition on import in errorcodes.lookup 2015-12-16 12:00:52 +00:00
test_extras_dictcursor.py Testing boilerplate unified in a single base class 2013-04-07 00:23:30 +01:00
test_green.py Testing boilerplate unified in a single base class 2013-04-07 00:23:30 +01:00
test_lobject.py Accept overflow errors testing for LO64 funcs 2015-02-08 02:04:41 +00:00
test_module.py Added test to verify _psycopg can be imported 2014-08-28 02:17:49 +01:00
test_notify.py Testing external script independent from psycopg implementation 2013-04-19 23:01:28 +01:00
test_psycopg2_dbapi20.py Pulled down changes from dvarrazzo branch on gh 2011-02-10 15:59:31 -07:00
test_quote.py Testing boilerplate unified in a single base class 2013-04-07 00:23:30 +01:00
test_transaction.py Testing boilerplate unified in a single base class 2013-04-07 00:23:30 +01:00
test_types_basic.py Skip null array test on Postgres versions not supporting it 2015-06-14 19:04:04 +01:00
test_types_extras.py Clear adapters in test to maintain reference count 2014-08-28 02:17:54 +01:00
test_with.py More tests tweaks 2015-02-08 12:51:36 +00:00
testconfig.py Report NotSupportedError for PGRES_COPY_BOTH and PGRES_SINGLE_TUPLE 2015-09-30 12:24:47 +01:00
testutils.py Report NotSupportedError for PGRES_COPY_BOTH and PGRES_SINGLE_TUPLE 2015-09-30 12:24:47 +01:00