Test Suite DocumentationΒΆ
The ezpz test suite provides comprehensive unit tests for all modules in the package. This documentation explains the structure, purpose, and usage of each test file.
Test OrganizationΒΆ
The test suite is organized into individual files, each focusing on a specific module or aspect of the ezpz package:
- Main Module Tests - Tests for the core ezpz package
- Configs Module Tests - Tests for configuration management
- Improved Configs Tests - Additional mocked coverage for configs
- Distributed Computing Tests - Tests for distributed training functionality
- History Module Tests - Tests for metrics tracking and history management
- Jobs Module Tests - Tests for job management and scheduling
- Logging Module Tests - Tests for logging functionality
- Profiling Module Tests - Tests for performance profiling
- Tensor Parallel Module Tests - Tests for tensor parallel computing
- Utilities Module Tests - Tests for utility functions
- Enhanced Utilities Tests - Mock-heavy tests for utility helpers
- Launch Module Tests - Tests for the launch functionality
- Terminal Plotting Tests - Tests for terminal-based plotting
- Lazy Import Tests - Tests for lazy loading functionality
- Modules-in-Isolation Tests - Smoke tests importing modules without
ezpz.__init__
- Property-Based Utility Tests - Hypothesis-driven validation for utility helpers
- Simple ezpz Smoke Tests - Minimal import/version checks
- Simple Test Harness - Standalone script for import validation
- Comprehensive Smoke Tests - Broad mocked environment checks
- Simple Test Runner - Scripted entry point for quick smoke testing
Running TestsΒΆ
To run the test suite:
Test StructureΒΆ
Each test file follows the standard pytest structure:
- Test functions start with
test_
- Test classes start with
Test
- Fixtures are used for setup/teardown
- Mocking is used to isolate units under test
Writing New TestsΒΆ
When adding new tests, follow these guidelines:
- Create a new test file following the naming convention
test_*.py
- Import the module you want to test
- Write test functions that verify specific behavior
- Use pytest fixtures for setup/teardown
- Use mocking to isolate units under test
- Add appropriate markers (e.g.,
@pytest.mark.slow
for slow tests)