Skip to content

Commit 240e54c

Browse files
committed
fix test for python 3.7
1 parent 57a7e9a commit 240e54c

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

Diff for: docker-compose-test.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,4 +51,4 @@ services:
5151
- percona-5.7
5252

5353
networks:
54-
default: {}
54+
default: {}

Diff for: pymysqlreplication/tests/test_basic.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -770,8 +770,8 @@ def setUp(self):
770770
ctl_db = copy.copy(self.database)
771771
ctl_db["db"] = None
772772
ctl_db["port"] = 3307
773-
if ctl_host := os.environ.get("MYSQL_5_7_CTL"):
774-
ctl_db["host"] = ctl_host
773+
if os.environ.get("MYSQL_5_7_CTL") is not None:
774+
ctl_db["host"] = os.environ.get("MYSQL_5_7_CTL")
775775
self.ctl_conn_control = pymysql.connect(**ctl_db)
776776
self.ctl_conn_control.cursor().execute("DROP DATABASE IF EXISTS pymysqlreplication_test")
777777
self.ctl_conn_control.cursor().execute("CREATE DATABASE pymysqlreplication_test")

Diff for: test.Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@ ARG MYSQL_5_7
1313
ENV MYSQL_5_7 ${MYSQL_5_7}
1414

1515
ARG MYSQL_5_7_CTL
16-
ENV MYSQL_5_7_CTL ${MYSQL_5_7_CTL}
16+
ENV MYSQL_5_7_CTL ${MYSQL_5_7_CTL}

0 commit comments

Comments
 (0)