Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make no_delay=None by default as result get rid of warning #55

Merged
merged 1 commit into from
Jan 10, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion aiomysql/connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def connect(host="localhost", user=None, password="",
read_default_file=None, conv=decoders, use_unicode=None,
client_flag=0, cursorclass=Cursor, init_command=None,
connect_timeout=None, read_default_group=None,
no_delay=False, autocommit=False, echo=False,
no_delay=None, autocommit=False, echo=False,
local_infile=False, loop=None):
"""See connections.Connection.__init__() for information about
defaults."""
Expand Down
12 changes: 2 additions & 10 deletions tests/test_connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,17 +193,9 @@ def test_connection_ping(self):
yield from conn.ping()
self.assertEqual(conn.closed, False)

@run_until_complete
def test_connection_set_nodelay_option(self):
conn = yield from self.connect(no_delay=True)
cur = yield from conn.cursor()
yield from cur.execute("SELECT 1;")
(r, ) = yield from cur.fetchone()
self.assertEqual(r, 1)

@run_until_complete
def test_connection_properties(self):
conn = yield from self.connect(no_delay=True)
conn = yield from self.connect()
self.assertEqual(conn.host, self.host)
self.assertEqual(conn.port, self.port)
self.assertEqual(conn.user, self.user)
Expand All @@ -213,7 +205,7 @@ def test_connection_properties(self):

@run_until_complete
def test_connection_double_ensure_closed(self):
conn = yield from self.connect(no_delay=True)
conn = yield from self.connect()
self.assertFalse(conn.closed)
yield from conn.ensure_closed()
self.assertTrue(conn.closed)
Expand Down