jeancochrane / jeancochrane/pytest-flask-sqlalchemy

Warning for every test since SQLAlchemy==1.3.17

Open
#36 5 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
253
Forks
45
PR merge metrics
No merged PRs in 30d

Description

# Description

In `SQLAlchemy==1.3.17`, a change was made (https://docs.sqlalchemy.org/en/13/changelog/changelog_13.html#change-7a6fdf5e0595f654572e4f8edb32b48c).

When using `pytest`, `flask`, `sqlalchemy` and `pytest-flask-sqlalchemy`, ([requirements.txt](https://github.com/VioletRainbows/flaskdb/blob/master/requirements.txt)) the following warning occurs for every test.

```
SAWarning: Reset agent is not active. This should not occur unless there was already a connectivity error in progress.
```

_This warning does not happen in the normal execution of the program._

# Expected behavior
No warnings present.

# How to reproduce
This issue can be reproduced with the code example [here](https://github.com/VioletRainbows/flaskdb).

## pytest output
```
$ pytest
======================================= test session starts ========================================
platform linux -- Python 3.8.0, pytest-6.0.0, py-1.9.0, pluggy-0.13.1
rootdir: /home/mia/workspace/flaskdb, configfile: setup.cfg, testpaths: tests
plugins: mock-3.2.0, flask-sqlalchemy-1.0.2
collected 2 items

tests/test_flaskdb.py .. [100%]

========================================= warnings summary =========================================
tests/test_flaskdb.py::test_insert_a
tests/test_flaskdb.py::test_insert_b
/home/mia/.virtualenvs/flaskdb/lib/python3.8/site-packages/sqlalchemy/pool/base.py:884: SAWarning: Reset agent is not active. This should not occur unless there was already a connectivity error in progress.
util.warn(

-- Docs: https://docs.pytest.org/en/stable/warnings.html
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.