Skip to content

Commit 231c9ba

Browse files
committed
increase test coverage
1 parent 0502a4e commit 231c9ba

2 files changed

Lines changed: 2 additions & 25 deletions

File tree

.coveragerc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
[run]
22
source =
33
./src
4+
omit =
5+
./src/gino/aiocontextvars.py
46
[report]
57
exclude_lines =
68
pragma: no cover

src/gino/dialects/aiomysql.py

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -47,31 +47,6 @@ class AiomysqlDBAPI(base.BaseDBAPI):
4747

4848
# noinspection PyAbstractClass
4949
class AiomysqlExecutionContext(base.ExecutionContextOverride, MySQLExecutionContext):
50-
async def _execute_scalar(self, stmt, type_):
51-
conn = self.root_connection
52-
if (
53-
isinstance(stmt, util.text_type)
54-
and not self.dialect.supports_unicode_statements
55-
):
56-
stmt = self.dialect._encoder(stmt)[0]
57-
58-
if self.dialect.positional:
59-
default_params = self.dialect.execute_sequence_format()
60-
else:
61-
default_params = {}
62-
63-
conn._cursor_execute(self.cursor, stmt, default_params, context=self)
64-
r = await self.cursor.async_execute(stmt, None, default_params, 1)
65-
r = r[0][0]
66-
if type_ is not None:
67-
# apply type post processors to the result
68-
proc = type_._cached_result_processor(
69-
self.dialect, self.cursor.description[0][1]
70-
)
71-
if proc:
72-
return proc(r)
73-
return r
74-
7550
def get_lastrowid(self):
7651
return self.cursor.last_row_id
7752

0 commit comments

Comments
 (0)