Skip to content

Commit 0e89101

Browse files
committed
Convert the tests to pytest
1 parent 11a97fd commit 0e89101

File tree

3 files changed

+240
-222
lines changed

3 files changed

+240
-222
lines changed

pyproject.toml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ dependencies = [
3939
]
4040
optional-dependencies.tests = [
4141
"coverage",
42+
"pytest",
43+
"pytest-django",
4244
]
4345
urls.Homepage = "https://github.com/matthiask/django-content-editor/"
4446

@@ -83,12 +85,12 @@ lint.extend-select = [
8385
"PGH",
8486
# flake8-pie
8587
"PIE",
88+
"PLC",
8689
# pylint
87-
"PL",
90+
"PLE",
91+
"PLW",
8892
# unused noqa
8993
"RUF100",
90-
# flake8-simplify
91-
"SIM",
9294
# pyupgrade
9395
"UP",
9496
"W",
@@ -110,3 +112,8 @@ lint.per-file-ignores."*/migrat*/*" = [
110112
lint.isort.combine-as-imports = true
111113
lint.isort.lines-after-imports = 2
112114
lint.mccabe.max-complexity = 15
115+
116+
[tool.pytest.ini_options]
117+
DJANGO_SETTINGS_MODULE = "testapp.settings"
118+
python_files = [ "tests.py", "test_*.py" ]
119+
addopts = "--reuse-db"

0 commit comments

Comments
 (0)