Skip to content

Commit 9938797

Browse files
authored
Merge pull request #878 from jd/psycopg2-2.8
tests: add psycopg2 2.8 support
2 parents 4c68385 + a70595b commit 9938797

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

.circleci/config.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -691,7 +691,7 @@ jobs:
691691
- checkout
692692
- *restore_cache_step
693693
- run: tox -e 'wait' postgres mysql
694-
- run: tox -e 'sqlalchemy_contrib-{py27,py34,py35,py36}-sqlalchemy{10,11,12}-psycopg2{27}-mysqlconnector' --result-json /tmp/sqlalchemy.results
694+
- run: tox -e 'sqlalchemy_contrib-{py27,py34,py35,py36}-sqlalchemy{10,11,12}-psycopg228-mysqlconnector' --result-json /tmp/sqlalchemy.results
695695
- persist_to_workspace:
696696
root: /tmp
697697
paths:
@@ -725,7 +725,7 @@ jobs:
725725
- checkout
726726
- *restore_cache_step
727727
- run: tox -e 'wait' postgres
728-
- run: tox -e 'psycopg_contrib-{py27,py34,py35,py36}-psycopg2{24,25,26,27}' --result-json /tmp/psycopg.results
728+
- run: tox -e 'psycopg_contrib-{py27,py34,py35,py36}-psycopg2{24,25,26,27,28}' --result-json /tmp/psycopg.results
729729
- persist_to_workspace:
730730
root: /tmp
731731
paths:

tests/contrib/sqlalchemy/test_postgres.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ def test_engine_execute_errors(self):
5050
# check the error
5151
self.assertEqual(span.error, 1)
5252
self.assertTrue('relation "a_wrong_table" does not exist' in span.get_tag('error.msg'))
53-
self.assertTrue('ProgrammingError' in span.get_tag('error.type'))
54-
self.assertTrue('ProgrammingError: relation "a_wrong_table" does not exist' in span.get_tag('error.stack'))
53+
assert 'psycopg2.errors.UndefinedTable' in span.get_tag('error.type')
54+
assert 'UndefinedTable: relation "a_wrong_table" does not exist' in span.get_tag('error.stack')
5555

5656

5757
class PostgresCreatorTestCase(PostgresTestCase):

tox.ini

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ envlist =
8787
mysql_contrib-{py27,py34,py35,py36}-mysqlconnector
8888
mysqldb_contrib-{py27}-mysqldb{12}
8989
mysqldb_contrib-{py27,py34,py35,py36}-mysqlclient{13}
90-
psycopg_contrib-{py27,py34,py35,py36}-psycopg2{24,25,26,27}
90+
psycopg_contrib-{py27,py34,py35,py36}-psycopg2{24,25,26,27,28}
9191
pylibmc_contrib-{py27,py34,py35,py36}-pylibmc{140,150}
9292
pylons_contrib-{py27}-pylons{096,097,010,10}
9393
pymemcache_contrib{,_autopatch}-{py27,py34,py35,py36}-pymemcache{130,140}
@@ -102,7 +102,7 @@ envlist =
102102
# DEV: This is a known issue for gevent 1.1, suggestion is to upgrade to gevent > 1.2
103103
# https://github.com/gevent/gevent/issues/903
104104
requests_gevent_contrib-{py36}-requests{208,209,210,211,212,213,219}-gevent{12,13}
105-
sqlalchemy_contrib-{py27,py34,py35,py36}-sqlalchemy{10,11,12}-psycopg2{27}-mysqlconnector
105+
sqlalchemy_contrib-{py27,py34,py35,py36}-sqlalchemy{10,11,12}-psycopg228-mysqlconnector
106106
sqlite3_contrib-{py27,py34,py35,py36}-sqlite3
107107
tornado_contrib-{py27,py34,py35,py36}-tornado{40,41,42,43,44,45}
108108
tornado_contrib-{py27}-tornado{40,41,42,43,44,45}-futures{30,31,32}
@@ -274,6 +274,7 @@ deps =
274274
psycopg225: psycopg2>=2.5,<2.6
275275
psycopg226: psycopg2>=2.6,<2.7
276276
psycopg227: psycopg2>=2.7,<2.8
277+
psycopg228: psycopg2>=2.8,<2.9
277278
redis26: redis>=2.6,<2.7
278279
redis27: redis>=2.7,<2.8
279280
redis28: redis>=2.8,<2.9

0 commit comments

Comments
 (0)