Testcontainers is a Python library that providing a friendly API to run Docker container. It is designed to create runtime environment to use during your automatic tests.
I find it strange that the dialect or driver parameter is hardcoded here (look screenshot below), because today there are many different methods and drivers for connecting to mysql. If I use something other than pymysql, I get the wrong connection address from the get_connection_url method.
Code:
Possible solution
Remove this hardcoded line and leave only mysql://...;
Allow you to pass an optional dialect or driver parameter to the get_connection_url function or the MySqlContainer class initializer. If its value is non-empty, then in the get_connection_url method it will be inserted into the right place in the connection string
Describe the bug
I find it strange that the dialect or driver parameter is hardcoded here (look screenshot below), because today there are many different methods and drivers for connecting to mysql. If I use something other than pymysql, I get the wrong connection address from the
get_connection_url
method.Code:
Possible solution
mysql://...
;get_connection_url
function or theMySqlContainer
class initializer. If its value is non-empty, then in theget_connection_url
method it will be inserted into the right place in the connection stringTo Reproduce
Runtime environment Looks optional for this issue