ploughshares/tests
colin 7e77951596 Comprehensive project improvements: UI enhancements, code consolidation, deployment configurations, and test organization 2025-07-03 11:49:24 -04:00
..
README.md Comprehensive project improvements: UI enhancements, code consolidation, deployment configurations, and test organization 2025-07-03 11:49:24 -04:00
__init__.py Comprehensive project improvements: UI enhancements, code consolidation, deployment configurations, and test organization 2025-07-03 11:49:24 -04:00
conftest.py Comprehensive project improvements: UI enhancements, code consolidation, deployment configurations, and test organization 2025-07-03 11:49:24 -04:00
test_app.py Comprehensive project improvements: UI enhancements, code consolidation, deployment configurations, and test organization 2025-07-03 11:49:24 -04:00
test_code_quality.py Comprehensive project improvements: UI enhancements, code consolidation, deployment configurations, and test organization 2025-07-03 11:49:24 -04:00
test_dependencies.py Comprehensive project improvements: UI enhancements, code consolidation, deployment configurations, and test organization 2025-07-03 11:49:24 -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.