diff --git a/tests/conftest.py b/tests/conftest.py index f26442f..90145a7 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -1,5 +1,3 @@ -"""Pytest configuration and fixtures for gdiffer tests.""" - import sys 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 def multi_file_diff(): return """diff --git a/app.py b/app.py @@ -56,7 +69,7 @@ index abc123..xyz789 100644 return True + +def new_func(): pass -""" + """ @pytest.fixture @@ -66,7 +79,7 @@ def sql_injection_diff(): query = "SELECT * FROM users WHERE name = '" + username + "'" return execute_query(query) + query = "SELECT * FROM users WHERE id = " + user_id -""" + """ @pytest.fixture