Commit b057aae
committed
test: make the suite runnable under dev.bat's Enterprise unlock
Three local-only failures, none of which CI could see. Two share a root cause
worth stating plainly: the native LicenseManager latches the first tier the
process resolves and offers no way back. `set_license_key("")` raises
ValueError, and `get_license_info()` keeps reporting the latched tier even after
QECTOR_LICENSE_KEY is removed from the environment. Any test asserting
Community-tier *rejection* is therefore unassertable once something has
resolved a higher tier.
test_enforcement_matrix `_native_cap_cell` popped QECTOR_LICENSE_KEY and assumed
that produced Community. It does, until the latch is set - which is why the file
passed alone and failed after test_rest_api_auth, whose authorised
/api/license/info request is the first call to get_license_info(). Bisected one
test at a time rather than guessed; three earlier theories (env caching,
QECTOR_API_KEY, QECTOR_ENFORCE) were each disproved by probe first.
test_auto_decoder_native monkeypatched the Python `qd.get_license_info`, but
NativeAutoDecoder asks the Rust gate, so the fake never applied.
Both now skip when the process has latched a non-Community tier, with the reason
stated. CI runs unlicensed, so the tier is Community there and every one of
these cells still executes - verified: 25 passed / 8 skipped unlicensed, exactly
as before, and 20 passed / 13 skipped under dev.bat with nothing failing.
test_auto_debug_fallbacks is unrelated and a real bug: it patched an instance
attribute on AutoDecoder, which defines __slots__, so unpatching raised
"attribute is read-only" in teardown. It never surfaced because CI has no GPU -
`_get_cuda()` returns None there and the entire patched block is skipped, so the
test passed while exercising none of the fallback path it exists to cover. Patch
the class instead.1 parent 29f6363 commit b057aae
3 files changed
Lines changed: 43 additions & 4 deletions
File tree
- python/tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
35 | 42 | | |
36 | | - | |
| 43 | + | |
37 | 44 | | |
38 | 45 | | |
39 | | - | |
| 46 | + | |
40 | 47 | | |
41 | | - | |
| 48 | + | |
42 | 49 | | |
43 | 50 | | |
44 | 51 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
38 | 50 | | |
39 | 51 | | |
40 | 52 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
165 | 165 | | |
166 | 166 | | |
167 | 167 | | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
168 | 188 | | |
169 | 189 | | |
170 | 190 | | |
| |||
0 commit comments