Skip to content

Commit bcadce5

Browse files
committed
Default to asyncio + remove marks
1 parent 21dc955 commit bcadce5

3 files changed

Lines changed: 1 addition & 15 deletions

File tree

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ strict = true
1515

1616
[tool.pytest.ini_options]
1717
addopts = "--doctest-modules"
18+
pytest_plugins = ["pytest_asyncio"]
1819

1920
[tool.ruff]
2021
target-version = "py310"

tests/integration/test_fast_forward_merged_prs.py

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
from pathlib import Path
22

3-
import pytest
4-
53
from git_sync.git import update_merged_prs
64
from git_sync.github import PullRequest
75

@@ -19,7 +17,6 @@
1917
REPO_URL = "https://github.com/example/example.git" # Dummy URL for test
2018

2119

22-
@pytest.mark.asyncio
2320
async def test_delete_merged_inactive_pr_branch() -> None:
2421
# Given a merged PR
2522
commit_a = create_commit("main", file="A\n")
@@ -47,7 +44,6 @@ async def test_delete_merged_inactive_pr_branch() -> None:
4744
}
4845

4946

50-
@pytest.mark.asyncio
5147
async def test_force_inactive_upstream_branch_to_merged_commit() -> None:
5248
# Given a merged PR
5349
commit_a = create_commit("main", file="A\n")
@@ -76,7 +72,6 @@ async def test_force_inactive_upstream_branch_to_merged_commit() -> None:
7672
}
7773

7874

79-
@pytest.mark.asyncio
8075
async def test_merged_inactive_pr_branch_with_deletion_disabled() -> None:
8176
# Given a merged PR
8277
commit_a = create_commit("main", file="A\n")
@@ -105,7 +100,6 @@ async def test_merged_inactive_pr_branch_with_deletion_disabled() -> None:
105100
}
106101

107102

108-
@pytest.mark.asyncio
109103
async def test_delete_merged_active_pr_branch() -> None:
110104
# Given a merged PR
111105
commit_a = create_commit("main", file="A\n")
@@ -135,7 +129,6 @@ async def test_delete_merged_active_pr_branch() -> None:
135129
assert get_current_branch() == "main"
136130

137131

138-
@pytest.mark.asyncio
139132
async def test_force_active_upstream_branch_to_merged_commit() -> None:
140133
# Given a merged PR
141134
commit_a = create_commit("main", file="A\n")
@@ -164,7 +157,6 @@ async def test_force_active_upstream_branch_to_merged_commit() -> None:
164157
}
165158

166159

167-
@pytest.mark.asyncio
168160
async def test_merged_active_upstream_branch_with_deletion_disabled() -> None:
169161
# Given a merged PR
170162
commit_a = create_commit("main", file="A\n")
@@ -193,7 +185,6 @@ async def test_merged_active_upstream_branch_with_deletion_disabled() -> None:
193185
}
194186

195187

196-
@pytest.mark.asyncio
197188
async def test_staged_changes_not_lost() -> None:
198189
# Given staged changes over a merged PR
199190
commit_a = create_commit("main", file="A\n")
@@ -220,7 +211,6 @@ async def test_staged_changes_not_lost() -> None:
220211
assert all_staged_changes() == {"file": "C\n"}
221212

222213

223-
@pytest.mark.asyncio
224214
async def test_unstaged_changes_to_committed_files_not_lost() -> None:
225215
# Given unstaged changes to committed files over a merged PR
226216
commit_a = create_commit("main", file="A\n")
@@ -247,7 +237,6 @@ async def test_unstaged_changes_to_committed_files_not_lost() -> None:
247237
assert Path("file.txt").read_text() == "C\n"
248238

249239

250-
@pytest.mark.asyncio
251240
async def test_fastforward_when_pr_had_additional_commits() -> None:
252241
# Given a merged PR with additional commits
253242
commit_a = create_commit("main", file="A\n")
@@ -277,7 +266,6 @@ async def test_fastforward_when_pr_had_additional_commits() -> None:
277266
}
278267

279268

280-
@pytest.mark.asyncio
281269
async def test_no_fastforward_when_branch_has_additional_commits() -> None:
282270
# Given a branch with additional commits
283271
commit_a = create_commit("main", file="A\n")

tests/integration/test_is_ancestor.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
1-
import pytest
2-
31
from git_sync.git import is_ancestor
42

53
from .gitutils import create_commit
64

75

8-
@pytest.mark.asyncio
96
async def test_is_ancestor_simple() -> None:
107
# Given two commits
118
base = create_commit("HEAD", foo="a")

0 commit comments

Comments
 (0)