This is an automated email from the ASF dual-hosted git repository.

skrawcz pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/hamilton.git


The following commit(s) were added to refs/heads/main by this push:
     new 3c758593 Add missing dependency group for async SQLAlchemy tests 
(#1474)
3c758593 is described below

commit 3c758593feea9c9dfa8b4ccb95b89ac4f4e0af07
Author: Dev-iL <[email protected]>
AuthorDate: Thu Feb 12 21:20:57 2026 +0200

    Add missing dependency group for async SQLAlchemy tests (#1474)
    
    * Add missing dependency group for async SQLAlchemy tests
    
    FAILED tests/plugins/test_polars_extensions.py::test_polars_database - 
ImportError: The SQLAlchemy asyncio module requires that the Python 'greenlet' 
library is installed.  In order to ensure this dependency is available, use the 
'sqlalchemy[asyncio]' install target:  'pip install sqlalchemy[asyncio]'
    
    * fix: Set matplotlib to non-interactive backend (Agg) for tests
    
    Workaround for: https://github.com/astral-sh/uv/issues/7036
---
 pyproject.toml                              | 2 +-
 tests/plugins/test_matplotlib_extensions.py | 2 ++
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/pyproject.toml b/pyproject.toml
index 9c3f5d84..fbe02735 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -123,7 +123,7 @@ test = [
   "pytest-cov",
   "PyYAML",
   "scikit-learn",
-  "sqlalchemy",
+  "sqlalchemy[asyncio]",
   "typer",
   "xgboost; python_version < '3.14'",
   "xlsx2csv", # for excel data loader
diff --git a/tests/plugins/test_matplotlib_extensions.py 
b/tests/plugins/test_matplotlib_extensions.py
index 7c689f01..2f4629f1 100644
--- a/tests/plugins/test_matplotlib_extensions.py
+++ b/tests/plugins/test_matplotlib_extensions.py
@@ -24,6 +24,8 @@ import pytest
 from hamilton.io.utils import FILE_METADATA
 from hamilton.plugins.matplotlib_extensions import MatplotlibWriter
 
+matplotlib.use("Agg")  # "Headless" backend for testing purposes
+
 
 def figure1():
     fig = plt.figure()

Reply via email to