11from pathlib import Path
22
3- import pytest
4-
53from git_sync .git import update_merged_prs
64from git_sync .github import PullRequest
75
1917REPO_URL = "https://github.com/example/example.git" # Dummy URL for test
2018
2119
22- @pytest .mark .asyncio
2320async 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
5147async 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
8075async 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
109103async 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
139132async 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
168160async 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
197188async 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
224214async 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
251240async 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
281269async 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 " )
0 commit comments