Comments (2)
My guess would be the default env.py
content alembic gives you includes something like:
from logging.config import fileConfig
fileConfig(context.config.config_file_name)
which messes with preexisting loggers by default.
We have a note about it, although for different reasons, in the docs
from pytest-alembic.
Thank you, are absolutely right. That was a causer.
Providing disable_existing_loggers=False
argument to fileConfig
didn't solve the issue for me. So I used another dirty hack to skip the logger configuration in tests:
import sys
if config.config_file_name is not None and 'pytest' not in sys.modules:
fileConfig(config.config_file_name)
from pytest-alembic.
Related Issues (20)
- pytest --test-alembic command fails with pytest 8.1.0 HOT 4
- Repeated migration application HOT 2
- Overriding fixtures doesn't work unless conftest.py is in the root HOT 2
- Exclude some migrations by hash HOT 9
- migrate_down_to("base") does not downgrate since v0.10.0 HOT 3
- Bug: during mid-migration check, database has data from latest migration HOT 2
- `test_model_definitions_match_ddl` fails because of an extra mock resource table HOT 2
- Running with `--test-alembic` creates tests in the wrong directory? HOT 5
- Running test_model_definitions_match_ddl() via imports will not show the context HOT 12
- alembic_runner.current does not work with alembic_version in different schema HOT 3
- Consider removing trailing print in runner.py HOT 1
- The fixture gets slower on each revision I create HOT 2
- Adjustments for Compatibility with SQLAlchemy 2.0 and Explicit Transactions HOT 2
- How to integrate with `create_all` fixture HOT 5
- Tests using the same database as pytest_alembic are failing on 0.10.7 HOT 11
- Docs update: `compare_type` now defaults to True HOT 1
- Is it possible to override database url for migrations? HOT 3
- Multiple database support HOT 3
- Issues with async tests HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pytest-alembic.