v0.6.3 Testing - griffingilreath/Punch-Card-Project GitHub Wiki

v0.6.3: Testing Infrastructure

Release Date: March 25, 2024

Overview

Version 0.6.3 significantly enhances the project's testing infrastructure, making it more robust, comprehensive, and easier to use. These improvements ensure better code quality and easier maintenance.

Key Changes

Test Documentation

  • Restored and reorganized testing documentation
  • Added comprehensive guides for running tests
  • Included examples of creating new tests
  • Enhanced documentation clarity for test procedures

Pytest Integration

  • Added comprehensive test suite with pytest integration
  • Configured pytest.ini for standardized test discovery
  • Added pytest-cov for test coverage reporting
  • Enabled parallel test execution for faster testing

Command-Line Testing

  • Updated command-line interface documentation for testing
  • Added new test-specific command-line arguments
  • Improved test output formatting
  • Enhanced error reporting for failed tests

Test Organization

  • Improved test script organization and clarity
  • Created dedicated test directories by component
  • Standardized test file naming conventions
  • Added test fixtures for common test scenarios

Test Modules

  • Removed outdated debug mode references
  • Added detailed test module descriptions
  • Created dedicated test files for each component
  • Enhanced test helper functions

Test Dependencies

  • Added pytest and pytest-cov dependencies
  • Updated requirements.txt with test dependencies
  • Included optional test dependencies for advanced features
  • Added documentation for installing test dependencies

Test Runners

  • Implemented both pytest and standalone test runners
  • Fixed inconsistencies in command-line arguments
  • Standardized test command formats
  • Enhanced test coverage reporting

Using the New Test Infrastructure

Run all tests with pytest:

python -m pytest

Run tests with coverage reporting:

python -m pytest --cov=src

Run a specific test module:

python -m pytest tests/test_led_controller.py

Run tests using the standalone runner:

python test_runner.py

Test Coverage

The enhanced test infrastructure includes tests for:

  • Core functionality
  • LED display and control
  • Punch card encoding
  • Hardware integration
  • User interface components
  • Command-line parsing
  • Error handling

Version History

For a complete history of all versions, see the Version History page.