Skip to content

Commit 976c0ea

Browse files
committed
fix
1 parent dddf6a3 commit 976c0ea

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

tests/test_api.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,16 +34,17 @@ def test_breaking_change() -> None:
3434
if check_if_upstream.returncode != 0:
3535
raise GitError("This is not a git repository")
3636

37+
origin = check_if_upstream.stdout.strip()
3738
fetch_cmd = ["git", "fetch", "--tags"]
38-
if not check_if_upstream.stdout == "https://github.com/apache/iceberg-python":
39+
if not origin == "https://github.com/apache/iceberg-python":
3940
fetch_cmd.append("upstream")
4041

4142
fetch_tags = subprocess.run(
4243
fetch_cmd,
4344
check=False,
4445
)
4546
if fetch_tags.returncode != 0:
46-
raise GitError(f"Cannot fetch Git tags with command: {fetch_cmd} from origin: {check_if_upstream.stdout}")
47+
raise GitError(f"Cannot fetch Git tags with command: {fetch_cmd} from origin: {origin}")
4748

4849
list_tags = subprocess.run(
4950
["git", "tag", "-l", "--sort=-version:refname"],
@@ -53,7 +54,7 @@ def test_breaking_change() -> None:
5354
check=False,
5455
encoding='utf-8',
5556
)
56-
output = list_tags.stdout
57+
output = list_tags.stdout.strip()
5758
if list_tags.returncode != 0 or not output:
5859
raise GitError(f"Cannot list Git tags: {output or 'no tags'}")
5960
tags = output.split("\n")

0 commit comments

Comments
 (0)