From bff83c162df6012c98d2f6420d4b9a08f2668971 Mon Sep 17 00:00:00 2001 From: Alexander Minges Date: Fri, 25 Jul 2025 12:22:03 +0200 Subject: [PATCH] fix: load test config in grants test - Add config_test.yaml loading to test_build_grants_with_default_config - Fix FileNotFoundError when config.yaml is not available in CI - Ensure test uses config_test.yaml instead of missing config.yaml --- tests/test_citation_builder.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/test_citation_builder.py b/tests/test_citation_builder.py index 49d8b53..75f53bc 100644 --- a/tests/test_citation_builder.py +++ b/tests/test_citation_builder.py @@ -216,6 +216,14 @@ def test_process_author_edge_cases(pi_finder): def test_build_grants_with_default_config(pi_finder): """Test that grants include default grants from config""" + import os + + from doi2dataset import Config + + # Load test config + config_path = os.path.join(os.path.dirname(__file__), "config_test.yaml") + Config.load_config(config_path=config_path) + # Use real data structure but focus on grants behavior data = {"authorships": [], "grants": []}