From 2c8b53f2e717db74cb6bfca195d5ca93ae47d6c3 Mon Sep 17 00:00:00 2001 From: Cryp Toon Date: Tue, 6 Feb 2024 10:34:31 +0100 Subject: [PATCH] Start mysql server when testing: --- .github/workflows/unittests-mysql.yaml | 3 +++ bitcoinlib/db.py | 1 - requirements.txt | 2 +- setup.cfg | 2 +- 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/unittests-mysql.yaml b/.github/workflows/unittests-mysql.yaml index a6a96e87..67e1399b 100644 --- a/.github/workflows/unittests-mysql.yaml +++ b/.github/workflows/unittests-mysql.yaml @@ -19,6 +19,9 @@ jobs: - name: Install dependencies run: | python -m pip install .[dev] + - name: Start mysql + run: | + sudo /etc/init.d/mysql start - name: Test with coverage env: BCL_CONFIG_FILE: config.ini.unittest diff --git a/bitcoinlib/db.py b/bitcoinlib/db.py index 46dc0197..b82cbeab 100644 --- a/bitcoinlib/db.py +++ b/bitcoinlib/db.py @@ -77,7 +77,6 @@ def __init__(self, db_uri=None, password=None): _logger.info("Using database: %s://%s:%s/%s" % (self.o.scheme or '', self.o.hostname or '', self.o.port or '', self.o.path or '')) self.db_uri = db_uri - print(db_uri) # VERIFY AND UPDATE DATABASE # Just a very simple database update script, without any external libraries for now diff --git a/requirements.txt b/requirements.txt index d2d4cc5f..347edd35 100644 --- a/requirements.txt +++ b/requirements.txt @@ -6,7 +6,7 @@ SQLAlchemy>=2.0.0 numpy>=1.22.0 sphinx>=6.0.0 coveralls>=3.0.1 -psycopg2>=2.9.2 +psycopg>=3.0.0 mysql-connector-python>=8.0.27 mysqlclient>=2.1.0 sphinx_rtd_theme>=1.0.0 diff --git a/setup.cfg b/setup.cfg index 8e4234ae..38b30dd6 100644 --- a/setup.cfg +++ b/setup.cfg @@ -47,7 +47,7 @@ dev = scrypt >= 0.8.18;platform_system!="Windows" sphinx >= 6.0.0 coveralls >= 3.0.1 - psycopg2 >= 2.9.2 + psycopg >= 3.0.0 mysql-connector-python >= 8.0.27 mysqlclient >= 2.1.0 sphinx_rtd_theme >= 1.0.0