test: read the withholds hint the way Python 3.10 reports it
CI / test (3.10) (push) Successful in 35s
CI / test (3.11) (push) Successful in 34s
CI / test (3.12) (push) Successful in 36s
CI / test (3.13) (push) Successful in 34s
CI / test (3.10) (pull_request) Successful in 33s
CI / test (3.11) (pull_request) Successful in 30s
CI / test (3.12) (pull_request) Successful in 31s
CI / test (3.13) (pull_request) Successful in 32s

This commit is contained in:
christianmanivong committed 2026-10-17 11:36:32 +02:00
1 parent 2d1c40c87d
commit 634c142477
1 file changed
+2 -1
+2 -1
View File
@@ -30,7 +30,8 @@ def test_a_missing_license_may_say_what_the_device_withholds_without_it():
# A Supermicro X10 with only SFT-OOB-LIC answers Redfish but keeps its drives and
# firmware inventory until DCMS is activated: partly licensed, not unlicensed.
hints = get_type_hints(LicenseDict)
assert hints["withholds"] == list[str] or str(hints["withholds"]).endswith("List[str]")
# Python 3.10 keeps NotRequired[...] around the type; later versions strip it.
assert "List[str]" in str(hints["withholds"])
assert "withholds" not in LicenseDict.__required_keys__