ploughshares/tests
colin 61dda71a56
ci/woodpecker/push/woodpecker Pipeline was successful Details
Initial commit with version 0.1.2
2025-07-03 13:44:14 -04:00
..
README.md Initial commit with version 0.1.2 2025-07-03 13:44:14 -04:00
__init__.py Initial commit with version 0.1.2 2025-07-03 13:44:14 -04:00
conftest.py Initial commit with version 0.1.2 2025-07-03 13:44:14 -04:00
test_app.py Initial commit with version 0.1.2 2025-07-03 13:44:14 -04:00
test_code_quality.py Initial commit with version 0.1.2 2025-07-03 13:44:14 -04:00
test_dependencies.py Initial commit with version 0.1.2 2025-07-03 13:44:14 -04:00

README.md

Ploughshares Tests

This directory contains tests for the Ploughshares application, focusing on:

  1. Core functionality testing
  2. Code quality verification
  3. Dependency vulnerability scanning

Test Files

  • test_app.py: Tests core application functionality

    • Verifies required imports
    • Checks for essential API routes
  • test_code_quality.py: Enforces code quality standards

    • Validates Python syntax
    • Checks for improper use of print statements
    • Verifies flake8 installation
  • test_dependencies.py: Scans for vulnerable dependencies

    • Checks requirements.txt for known vulnerable packages
    • Integrates with safety tool when available

Running Tests

Run all tests:

python3 -m pytest

Run a specific test file:

python3 -m pytest test_app.py

Run with verbose output:

python3 -m pytest -v

Required Tools

IMPORTANT: The following tools are required for complete testing:

  • flake8: Code style checker
  • safety: Dependency vulnerability scanner
  • bandit: Security issue scanner

Install these tools with:

../install-codechecks.sh

Pre-commit Integration

These tests are automatically run by the Git pre-commit hook to ensure code quality standards are maintained before allowing commits.