Skip to content

Commit

Permalink
Merge "use SQLAlchemy's xdist methods" into main
Browse files Browse the repository at this point in the history
  • Loading branch information
zzzeek authored and Gerrit Code Review committed Mar 4, 2024
2 parents d23a878 + 6bdb904 commit 55038e6
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 9 deletions.
5 changes: 5 additions & 0 deletions docs/build/unreleased/1435.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.. change::
:tags: bug, tests
:tickets: 1435

Fixes to support pytest 8.1 for the test suite.
15 changes: 7 additions & 8 deletions tests/test_command.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def setup_class(cls):
def teardown_class(cls):
clear_staging_env()

def teardown(self):
def tearDown(self):
self.cfg.set_main_option("revision_environment", "false")

@classmethod
Expand Down Expand Up @@ -206,13 +206,12 @@ def test_history_indicate_current(self):


class RevisionEnvironmentTest(_BufMixin, TestBase):
@classmethod
def setup(cls):
cls.env = staging_env()
cls.cfg = _sqlite_testing_config()
cls._setup_env_file()
def setUp(self):
self.env = staging_env()
self.cfg = _sqlite_testing_config()
self._setup_env_file()

def teardown(self):
def tearDown(self):
self.cfg.set_main_option("revision_environment", "false")
clear_staging_env()

Expand Down Expand Up @@ -1144,7 +1143,7 @@ def setup_class(cls):
cls.cfg = _sqlite_testing_config()
cls.a, cls.b, cls.c = three_rev_fixture(cls.cfg)

def teardown(self):
def tearDown(self):
os.environ.pop("ALEMBIC_CONFIG", None)

@classmethod
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ SQLA_REPO = {env:SQLA_REPO:git+https://github.com/sqlalchemy/sqlalchemy.git}
[testenv]
cov_args=--cov=alembic --cov-report term --cov-report xml

deps=pytest>4.6
deps=pytest>4.6,<8.2
pytest-xdist
sqla13: pytest<7
sqla13: {[tox]SQLA_REPO}@rel_1_3#egg=sqlalchemy
Expand Down

0 comments on commit 55038e6

Please sign in to comment.