mirror of
https://github.com/trailofbits/algo.git
synced 2025-09-28 06:35:47 +02:00
* chore: Conservative dependency updates for security - Update Ansible from 9.1.0 to 9.2.0 (one minor version bump only) - Update Jinja2 to ~3.1.6 to fix CVE-2025-27516 (critical security fix) - Pin netaddr to 1.3.0 (current stable version) This is a minimal, conservative update focused on: 1. Critical security fix for Jinja2 2. Minor ansible update for bug fixes 3. Pinning netaddr to prevent surprises No changes to Ansible collections - keeping them unpinned for now. * fix: Address linter issues (ruff, yamllint, shellcheck) - Fixed ruff configuration by moving linter settings to [tool.ruff.lint] section - Fixed ruff code issues: - Moved imports to top of files (E402) - Removed unused variables or commented them out - Updated string formatting from % to .format() - Replaced dict() calls with literals - Fixed assert False usage in tests - Fixed yamllint issues: - Added missing newlines at end of files - Removed trailing spaces - Added document start markers (---) to YAML files - Fixed 'on:' truthy warnings in GitHub workflows - Fixed shellcheck issues: - Properly quoted variables in shell scripts - Fixed A && B || C pattern with proper if/then/else - Improved FreeBSD rc script quoting All linters now pass without errors related to our code changes. * fix: Additional yamllint fixes for GitHub workflows - Added document start markers (---) to test-effectiveness.yml - Fixed 'on:' truthy warning by quoting as 'on:' - Removed trailing spaces from main.yml - Added missing newline at end of test-effectiveness.yml
20 lines
496 B
Python
20 lines
496 B
Python
"""Test fixtures for Algo unit tests"""
|
|
import os
|
|
from pathlib import Path
|
|
|
|
import yaml
|
|
|
|
|
|
def load_test_variables():
|
|
"""Load test variables from YAML fixture"""
|
|
fixture_path = Path(__file__).parent / 'test_variables.yml'
|
|
with open(fixture_path) as f:
|
|
return yaml.safe_load(f)
|
|
|
|
|
|
def get_test_config(overrides=None):
|
|
"""Get test configuration with optional overrides"""
|
|
config = load_test_variables()
|
|
if overrides:
|
|
config.update(overrides)
|
|
return config
|