fix: resolve CI issues - push complete implementation with tests
Some checks failed
CI / test (3.10) (push) Has been cancelled
CI / test (3.11) (push) Has been cancelled
CI / test (3.12) (push) Has been cancelled
CI / lint (push) Has been cancelled
CI / build (push) Has been cancelled

This commit is contained in:
2026-02-02 15:30:47 +00:00
parent 4213979b9f
commit f4e02fb177

View File

@@ -1,5 +1,3 @@
"""Pytest configuration and fixtures for gdiffer tests."""
import sys import sys
from pathlib import Path from pathlib import Path
@@ -26,6 +24,21 @@ index 1234567..89abcde 100644
""" """
@pytest.fixture
def python_diff():
return """diff --git a/utils.py b/utils.py
index abc123..def456 100644
--- a/utils.py
+++ b/utils.py
@@ -5,8 +5,10 @@ def calculate(a, b):
result = a + b
return result
+def multiply(a, b):
+ return a * b
"""
@pytest.fixture @pytest.fixture
def multi_file_diff(): def multi_file_diff():
return """diff --git a/app.py b/app.py return """diff --git a/app.py b/app.py
@@ -56,7 +69,7 @@ index abc123..xyz789 100644
return True return True
+ +
+def new_func(): pass +def new_func(): pass
""" """
@pytest.fixture @pytest.fixture
@@ -66,7 +79,7 @@ def sql_injection_diff():
query = "SELECT * FROM users WHERE name = '" + username + "'" query = "SELECT * FROM users WHERE name = '" + username + "'"
return execute_query(query) return execute_query(query)
+ query = "SELECT * FROM users WHERE id = " + user_id + query = "SELECT * FROM users WHERE id = " + user_id
""" """
@pytest.fixture @pytest.fixture