Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test suite breaks in pytest 8.1 #1435

Closed
zzzeek opened this issue Mar 4, 2024 · 3 comments
Closed

test suite breaks in pytest 8.1 #1435

zzzeek opened this issue Mar 4, 2024 · 3 comments

Comments

@zzzeek
Copy link
Member

zzzeek commented Mar 4, 2024

teardown is not called

rm -fr scratch; PYTHONPATH=~/dev/sqlalchemy/lib/ pytest tests/test_command.py::HistoryTest

fails under pytest 8.1 only

FAILED tests/test_command.py::HistoryTest::test_history_num_plus_relative - AssertionError: 'environment included OK\nRev: dd711a17688e (head)\nParent: ab3d7d7d454d\nPath: /home/classic/dev/alembic/scratch/scripts/versions/dd711a17688e_revision_c.py\n\n  ...
FAILED tests/test_command.py::HistoryTest::test_history_num_range - AssertionError: 'environment included OK\nRev: ab3d7d7d454d\nParent: 642ae92838b4\nPath: /home/classic/dev/alembic/scratch/scripts/versions/ab3d7d7d454d_revision_b.py\n\n    Rev B...
FAILED tests/test_command.py::HistoryTest::test_history_num_to_head - AssertionError: 'environment included OK\nRev: dd711a17688e (head)\nParent: ab3d7d7d454d\nPath: /home/classic/dev/alembic/scratch/scripts/versions/dd711a17688e_revision_c.py\n\n  ...
FAILED tests/test_command.py::HistoryTest::test_history_relative_to_num - AssertionError: 'environment included OK\nRev: dd711a17688e (head)\nParent: ab3d7d7d454d\nPath: /home/classic/dev/alembic/scratch/scripts/versions/dd711a17688e_revision_c.py\n\n  ...
FAILED tests/test_command.py::HistoryTest::test_history_too_large_relative_to_num - AssertionError: 'environment included OK\nRev: dd711a17688e (head)\nParent: ab3d7d7d454d\nPath: /home/classic/dev/alembic/scratch/scripts/versions/dd711a17688e_revision_c.py\n\n  ...

@zzzeek
Copy link
Member Author

zzzeek commented Mar 4, 2024

@zzzeek
Copy link
Member Author

zzzeek commented Mar 4, 2024

it was deprecated a year ago with no warnings, claimed to be removed in 8.0 but wasn't, but anyway, need to change the name

@sqla-tester
Copy link
Collaborator

Mike Bayer has proposed a fix for this issue in the main branch:

use SQLAlchemy's xdist methods https://gerrit.sqlalchemy.org/c/sqlalchemy/alembic/+/5177

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants