MCPcopy
hub / github.com/PyMySQL/PyMySQL / __exit__

Method __exit__

pymysql/tests/test_connection.py:39–43  ·  view source on GitHub ↗
(self, exc_type, exc_value, traceback)

Source from the content-addressed store, hash-verified

37 return self
38
39 def __exit__(self, exc_type, exc_value, traceback):
40 if self._grant:
41 self._c.execute(f"REVOKE SELECT ON {self._db}.* FROM {self._user}")
42 if self._created:
43 self._c.execute("DROP USER %s" % self._user)
44
45
46class TestAuthentication(base.PyMySQLTestCase):

Callers

nothing calls this directly

Calls 1

executeMethod · 0.80

Tested by

no test coverage detected