Skip to content

Commit 1be420b

Browse files
committed
add test test_no_delay_warning
1 parent e909759 commit 1be420b

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

pymysql/tests/test_connection.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
import datetime
22
import decimal
3-
import pymysql
43
import time
4+
import sys
5+
import unittest2
6+
import pymysql
57
from pymysql.tests import base
68

79

@@ -74,6 +76,13 @@ def test_init_command(self):
7476
self.assertEqual(('foobar',), c.fetchone())
7577
conn.close()
7678

79+
@unittest2.skipUnless(sys.version_info[0:2] >= (3,2), "required py-3.2")
80+
def test_no_delay_warning(self):
81+
current_db = self.databases[0].copy()
82+
current_db['no_delay'] = True
83+
with self.assertWarns(DeprecationWarning) as cm:
84+
conn = pymysql.connect(**current_db)
85+
7786

7887
# A custom type and function to escape it
7988
class Foo(object):

0 commit comments

Comments
 (0)