Skip to content

Commit 6cbcb77

Browse files
committed
tests: document unit tests
1 parent 88f3c3d commit 6cbcb77

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

tests/README.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,17 @@ The test suite is organized into two main categories:
1616
- `test_network_isolation.py` - Verifies offline execution after installation
1717
- `test_version_verification.py` - Version and checksum verification
1818

19+
### Unit Tests (`unit/`)
20+
- Fast, isolated tests with mocked dependencies
21+
- Service layer business logic
22+
- Repository matching algorithms
23+
- Checksum verification and parallel downloads
24+
- Platform detection and emulation handling
25+
- Organized by layer:
26+
- `services/` - Service layer tests (VersionManager, ArtifactManager, etc.)
27+
- `infrastructure/` - Infrastructure layer tests (FilesystemManager, HTTP client)
28+
- `models/` - Domain model tests (VersionRange, SolcArtifact, etc.)
29+
1930
## Running Tests
2031

2132
### Install test dependencies
@@ -95,6 +106,14 @@ The test suite uses different fixtures depending on the test type:
95106
- `run_command` - Executes shell commands for tests using `isolated_solc_data`
96107
- `run_in_venv` - Executes commands in isolated virtual environments
97108

109+
### Unit Test Fixtures (`unit/conftest.py`)
110+
- `mock_session` - Mock requests.Session for HTTP calls
111+
- `mock_filesystem` - Mock FilesystemManager
112+
- `mock_platform` - Mock Platform (linux-amd64 by default)
113+
- `mock_repository` - Mock SolcRepository with common version set
114+
- `temp_artifacts_dir` - Temporary artifacts directory for testing
115+
- `temp_solc_select_dir` - Temporary solc-select directory with isolated paths
116+
98117
## Test Organization
99118

100119
| Test Module | Test Class | Description |

0 commit comments

Comments
 (0)