py-cpuinfo icon indicating copy to clipboard operation
py-cpuinfo copied to clipboard

Add test that checks data patterns of result

Open workhorsy opened this issue 2 years ago • 0 comments

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.

  1. Make sure results are correct data types
  2. Make sure results match regex pattern

workhorsy avatar Sep 07 '22 21:09 workhorsy