Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion requirements/test.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ pytest-timeout

# Conditional dependencies
pytest>=6.2.5,<8.0; python_version < '3.9' # Python 3.8 only
pytest>=6.2.5,<9.0; python_version >= '3.9' # Python 3.9+ only
pytest>=6.2.5,<10.0; python_version >= '3.9' # Python 3.9+ only
pytest-django>=4.5.2,<4.6.0; python_version < '3.9' # Python 3.8 only
pytest-django>=4.5.2,<5.0; python_version >= '3.9' # Python 3.9+ only
backports.zoneinfo; python_version < '3.9' # Python 3.8 only
3 changes: 0 additions & 3 deletions t/unit/test_schedulers.py
Original file line number Diff line number Diff line change
Expand Up @@ -561,7 +561,6 @@ def test_task_with_expires(self):
class test_DatabaseSchedulerFromAppConf(SchedulerCase):
Scheduler = TrackingScheduler

@pytest.mark.django_db
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why removing this?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The link I posted in the issue description explains it. This is a mark applied to a fixture function. With pytest<9 it was a no-op; with pytest>=9 it is an error. It doesn't matter what the mark is.

The mark that actually matters is the one applied to the class, which my PR doesn't touch.

@pytest.fixture(autouse=True)
def setup_scheduler(self, app):
self.app = app
Expand Down Expand Up @@ -617,7 +616,6 @@ def test_periodic_task_model_schedule_type_change(self):
class test_DatabaseScheduler(SchedulerCase):
Scheduler = TrackingScheduler

@pytest.mark.django_db
@pytest.fixture(autouse=True)
def setup_scheduler(self, app):
self.app = app
Expand Down Expand Up @@ -1588,7 +1586,6 @@ def test_track_changes(self):

@pytest.mark.django_db
class test_modeladmin_PeriodicTaskAdmin(SchedulerCase):
@pytest.mark.django_db
@pytest.fixture(autouse=True)
def setup_scheduler(self, app):
self.app = app
Expand Down
Loading