mirror of
https://github.com/psycopg/psycopg2.git
synced 2024-11-25 18:33:44 +03:00
Don't test with server not implementing INSERT with VALUES list
This commit is contained in:
parent
3873c6c09f
commit
2e18b42db0
|
@ -14,10 +14,10 @@
|
|||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
|
||||
# License for more details.
|
||||
|
||||
import unittest
|
||||
from datetime import date
|
||||
|
||||
from testutils import ConnectingTestCase
|
||||
import testutils
|
||||
from testutils import unittest
|
||||
|
||||
import psycopg2
|
||||
import psycopg2.extras
|
||||
|
@ -49,7 +49,7 @@ class FastExecuteTestMixin(object):
|
|||
id serial primary key, date date, val int, data text)""")
|
||||
|
||||
|
||||
class TestExecuteBatch(FastExecuteTestMixin, ConnectingTestCase):
|
||||
class TestExecuteBatch(FastExecuteTestMixin, testutils.ConnectingTestCase):
|
||||
def test_empty(self):
|
||||
cur = self.conn.cursor()
|
||||
psycopg2.extras.execute_batch(cur,
|
||||
|
@ -123,7 +123,7 @@ class TestExecuteBatch(FastExecuteTestMixin, ConnectingTestCase):
|
|||
self.assertEqual(cur.fetchone(), (3, snowman))
|
||||
|
||||
|
||||
class TestExecuteValuse(FastExecuteTestMixin, ConnectingTestCase):
|
||||
class TestExecuteValues(FastExecuteTestMixin, testutils.ConnectingTestCase):
|
||||
def test_empty(self):
|
||||
cur = self.conn.cursor()
|
||||
psycopg2.extras.execute_values(cur,
|
||||
|
@ -230,6 +230,10 @@ class TestExecuteValuse(FastExecuteTestMixin, ConnectingTestCase):
|
|||
self.assertEqual(cur.fetchall(), [(1, 'hi')])
|
||||
|
||||
|
||||
testutils.decorate_all_tests(TestExecuteValues,
|
||||
testutils.skip_before_postgres(8, 2))
|
||||
|
||||
|
||||
def test_suite():
|
||||
return unittest.TestLoader().loadTestsFromName(__name__)
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user