psutil icon indicating copy to clipboard operation
psutil copied to clipboard

test_swap_memory() accepts no free swap

Open vstinner opened this issue 2 years ago • 1 comments

A system can run with no free swap space.

Summary

  • OS: Linux
  • Bug fix: yes
  • Type: tests
  • Fixes: { comma-separated list of issues fixed by this PR, if any }

Description

psutil.tests.test_system.TestMemoryAPIs.test_swap_memory fails if the free swap space is zero. The test makes an assumption which is wrong.

Example when building psutil package on Red Hat Koji build server: https://bugzilla.redhat.com/show_bug.cgi?id=1991086

vstinner avatar Aug 11 '21 12:08 vstinner

I used git commit --amend --no-edit --signoff to sign off my commit.

vstinner avatar Aug 11 '21 12:08 vstinner