tests/
├── conftest.py # Shared test support (FakeArchiveClient, sample_archive_files)
├── data/ # Static test fixtures (e.g., sample data files)
├── test_archive_client.py # Archive client unit and integration tests
├── test_archive_workflow.py # Workflow unit and integration tests (list + download + verify)
├── test_checksum.py # checksum module unit tests (calc, read, verify_single_file)
├── test_cli.py # CLI smoke tests (list-symbols, list-files, download, verify)
├── test_downloader.py # aria2 downloader unit tests (proxy, batching, retry)
├── test_enums.py # common.enums property tests
├── test_filter.py # Symbol filter unit tests
├── test_path.py # Archive-home resolution (override, env var, missing)
├── test_progress.py # Progress-reporting framework (LogReporter, TqdmReporter)
├── test_symbol_dir.py # SymbolArchiveDir, create_symbol_archive_dir, marker protocol
└── test_symbols.py # Symbol inference unit and integration tests
- Unit tests use
monkeypatchto replace HTTP methods with fake responses. - Integration tests are marked with
@pytest.mark.integrationand skipped by default. Run them explicitly withpytest --run-integration. - CLI tests use
typer.testing.CliRunnerand monkeypatch the workflow'srun()method so they run without network access.
FakeArchiveClient— a programmable stub configured entirely via constructor kwargs (symbols=,files_by_symbol=,errors_by_symbol=). It implementslist_symbols,list_symbol_files, andlist_symbol_files_batch. The batch method recordsprogress_barstate for assertion in tests. Prefer extending this stub over re-implementing per-test fakes when you add new workflows.sample_archive_files— a representative pair ofArchiveFileentries (.zip+.zip.CHECKSUM) for list-files-style workflow and CLI tests.--run-integration— a custom pytest option that unlocks theintegrationmarker. The default run skips every integration test.
See also: Extending the Project | Architecture