Skip to content

Commit 231a302

Browse files
authored
Update and rename 1 to __init__.py
1 parent d6d50b3 commit 231a302

2 files changed

Lines changed: 31 additions & 1 deletion

File tree

tests/1

Lines changed: 0 additions & 1 deletion
This file was deleted.

tests/__init__.py

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
2+
"""
3+
Test suite for distributed training framework
4+
5+
This package contains all tests:
6+
- Unit tests for individual components
7+
- Integration tests for end-to-end workflows
8+
- Performance benchmarking tests
9+
"""
10+
11+
import os
12+
import sys
13+
14+
# Add src to path for testing
15+
sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '..')))
16+
17+
__all__ = []
18+
19+
# Test utilities
20+
def setup_test_environment():
21+
"""Setup test environment"""
22+
os.environ['RANK'] = '0'
23+
os.environ['LOCAL_RANK'] = '0'
24+
os.environ['WORLD_SIZE'] = '1'
25+
os.environ['MASTER_ADDR'] = 'localhost'
26+
os.environ['MASTER_PORT'] = '29500'
27+
28+
def cleanup_test_environment():
29+
"""Cleanup test environment"""
30+
for key in ['RANK', 'LOCAL_RANK', 'WORLD_SIZE', 'MASTER_ADDR', 'MASTER_PORT']:
31+
os.environ.pop(key, None)

0 commit comments

Comments
 (0)