Skip to content

Conversation

@yurekami
Copy link
Contributor

Description

Add pytest configuration file for standardized test running.

Configuration

Test Discovery

  • Path: tests/
  • Pattern: test_*.py files, test_* functions

Output Options

  • Verbose mode (-v)
  • Short tracebacks (--tb=short)
  • Summary of non-passing tests (-ra)
  • Strict markers (undefined markers cause errors)

Custom Markers

Marker Description
slow Long-running tests
gpu Tests requiring GPU
sm90 Tests for Hopper architecture
sm100 Tests for Blackwell architecture
fp8 FP8 GEMM tests
bf16 BF16 GEMM tests
attention Attention kernel tests
einsum Einsum tests

Usage Examples

pytest                      # Run all tests
pytest -m "not slow"        # Skip slow tests
pytest -m fp8               # Run only FP8 tests
pytest -m "gpu and sm90"    # Run SM90 GPU tests
pytest tests/test_bf16.py   # Run specific test file

Benefits

  • Consistent test configuration across environments
  • Custom markers for selective test runs
  • Better output formatting for debugging

Testing

  • Valid pytest.ini syntax
  • Verify pytest discovers tests correctly

🤖 Generated with Claude Code

Add pytest.ini with configuration for running tests:

Test Discovery:
- Test path: tests/
- Pattern: test_*.py files, test_* functions

Output:
- Verbose mode (-v)
- Short tracebacks (--tb=short)
- Show summary of all non-passing tests (-ra)

Custom Markers:
- slow: Long-running tests
- gpu: Tests requiring GPU
- sm90: Tests for Hopper architecture
- sm100: Tests for Blackwell architecture
- fp8: FP8 GEMM tests
- bf16: BF16 GEMM tests
- attention: Attention kernel tests
- einsum: Einsum tests

Usage:
  pytest                      # Run all tests
  pytest -m "not slow"        # Skip slow tests
  pytest -m fp8               # Run only FP8 tests
  pytest tests/test_bf16.py   # Run specific test file

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant