py-cpuinfo
py-cpuinfo copied to clipboard
Add test that checks data patterns of result
We just had a bug where getting cache sizes from lscpu broke from changes to lscpu. This was broken for 1.5 years without me noticing. The fields for cache, such as "l2_cache_size"
where wrong:
We were getting:
# python string
"256 KiB (8 instances)"
instead of:
# python int
262144
If we update the test_actual, we can make sure we are getting sane results.
- Make sure results are correct data types
- Make sure results match regex pattern