Commit ec9a906
committed
Fix test failures: pytest collection warning and validator bug
This commit fixes two test issues discovered in CI:
1. Pytest Collection Warning (test_base_ingestor.py):
- Renamed TestIngestor to MockIngestor
- Pytest was incorrectly treating the helper class as a test class
- The class starts with "Test" but is a concrete implementation for testing
- Updated all references in fixtures and assertions
2. Validator Test Failures (test_qlib_binary_writer.py):
- Fixed bug in QlibBinaryValidator._validate_instruments()
- Instruments file format is tab-separated: SYMBOL\tstart_date\tend_date
- Validator was not splitting by tab, causing symbol lookups to fail
- Now properly extracts just the symbol field (first column)
- This fixes both test_validator_features and test_validator_full
Test Results:
- All 123 unit tests now pass (previously 2 failures, 1 warning)
- test_base_ingestor.py: 11/11 passed
- test_qlib_binary_writer.py: 20/20 passed (including previously failing tests)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>1 parent ff312aa commit ec9a906
2 files changed
Lines changed: 12 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
133 | 133 | | |
134 | 134 | | |
135 | 135 | | |
136 | | - | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
137 | 145 | | |
138 | 146 | | |
139 | 147 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
| 39 | + | |
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| |||
182 | 182 | | |
183 | 183 | | |
184 | 184 | | |
185 | | - | |
| 185 | + | |
186 | 186 | | |
187 | 187 | | |
188 | 188 | | |
| |||
0 commit comments