Skip to content

Commit c620c45

Browse files
committed
Enable pytest ruff rules
1 parent d20d3a9 commit c620c45

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

pyproject.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,8 @@ lint.extend-select = [
100100
"PLC",
101101
"PLE",
102102
"PLW",
103+
# pytest
104+
"PT",
103105
# unused noqa
104106
"RUF100",
105107
# pyupgrade

tests/testapp/test_feincms3.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -447,7 +447,7 @@ def test_apps(client):
447447

448448

449449
@pytest.fixture
450-
def _apps_validation_models():
450+
def apps_validation_models():
451451
home = Page.objects.create(
452452
title="home",
453453
slug="home",
@@ -470,11 +470,11 @@ def _apps_validation_models():
470470

471471

472472
@pytest.mark.django_db
473-
def test_apps_duplicate(_apps_validation_models):
473+
def test_apps_duplicate(apps_validation_models):
474474
"""Test that apps cannot be added twice with the exact same configuration"""
475475
deactivate_all()
476476

477-
home, blog = _apps_validation_models
477+
home, blog = apps_validation_models
478478

479479
home2 = Page.objects.create(
480480
title="home",
@@ -531,11 +531,11 @@ def test_apps_required_fields():
531531

532532

533533
@pytest.mark.django_db
534-
def test_apps_cloning_validation(client, _apps_validation_models):
534+
def test_apps_cloning_validation(client, apps_validation_models):
535535
"""Checks that the target is properly validated when cloning"""
536536
deactivate_all()
537537

538-
home, blog = _apps_validation_models
538+
home, blog = apps_validation_models
539539

540540
clone_url = reverse("admin:testapp_page_clone", args=(blog.pk,))
541541

tests/testapp/test_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111

1212
@pytest.mark.parametrize(
13-
"url, hosts, result",
13+
("url", "hosts", "result"),
1414
[
1515
(
1616
"http://example.com/",

0 commit comments

Comments
 (0)