Skip to content

Commit c484514

Browse files
authored
Fix deprecation warnings in tests (#461)
* Fix DeprecationWarning for invalid escape sequence in test * Fix pytest-asyncio deprecation warnings - Add asyncio_default_fixture_loop_scope setting to pyproject.toml - Fix [tool.pytest] to [tool.pytest.ini_options] in e2e_projects
1 parent eb4530a commit c484514

File tree

5 files changed

+6
-4
lines changed

5 files changed

+6
-4
lines changed

e2e_projects/config/pyproject.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,5 @@ pytest_add_cli_args_test_selection = [ "-m", "not fail", "-k=test_include"]
3636

3737
[tool.pytest.ini_options]
3838
xfail_strict = true
39-
markers = [ "fail: tests that should be ignored with mutmut" ]
39+
markers = [ "fail: tests that should be ignored with mutmut" ]
40+
asyncio_default_fixture_loop_scope = "function"

e2e_projects/mutate_only_covered_lines/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,5 @@ tests_dir = [ "tests/main/" ]
2323
do_not_mutate = [ "*ignore*" ]
2424
# do not add paths_to_mutate because we want to test src guessing
2525

26-
[tool.pytest]
26+
[tool.pytest.ini_options]
2727
asyncio_default_fixture_loop_scope = "function"

e2e_projects/my_lib/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,5 @@ dev = [
1919
[tool.mutmut]
2020
debug = true
2121

22-
[tool.pytest]
22+
[tool.pytest.ini_options]
2323
asyncio_default_fixture_loop_scope = "function"

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,3 +60,4 @@ dev = [
6060
testpaths = [
6161
"tests",
6262
]
63+
asyncio_default_fixture_loop_scope = "function"

tests/test_mutation.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -434,7 +434,7 @@ def test_bug_github_issue_77():
434434

435435

436436
def test_bug_github_issue_435():
437-
source = """
437+
source = r"""
438438
def parse(self, text: str) -> tuple[Tree[Token], str]:
439439
text = re.sub(r'[\w\-] [\w\-]', dashrepl, text)
440440

0 commit comments

Comments
 (0)