Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tests: Compare floats less strictly #2372

Merged
merged 1 commit into from
Mar 15, 2024
Merged

Conversation

hroncok
Copy link
Contributor

@hroncok hroncok commented Feb 9, 2024

Summary

  • OS: CentOS Stream 10
  • Bug fix: maybe
  • Type: tests
  • Fixes: N/A

Description

We see:

======================================================================
FAIL: psutil.tests.test_system.TestCpuAPIs.test_cpu_times
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/psutil-release-5.9.5/psutil/tests/test_system.py", line 351, in test_cpu_times
    self.assertAlmostEqual(total, sum(times))
AssertionError: 885725913.3 != 885725913.3000001 within 7 places (1.1920928955078125e-07 difference)
----------------------------------------------------------------------

Or:

======================================================================
FAIL: psutil.tests.test_system.TestCpuAPIs.test_cpu_times
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/psutil-release-5.9.5/psutil/tests/test_system.py", line 351, in test_cpu_times
    self.assertAlmostEqual(total, sum(times))
AssertionError: 324284741.90999997 != 324284741.91 within 7 places (5.960464477539063e-08 difference)
----------------------------------------------------------------------

In CentOS Stream 10 builds on i686 and x86_64.

We see:

    ======================================================================
    FAIL: psutil.tests.test_system.TestCpuAPIs.test_cpu_times
    ----------------------------------------------------------------------
    Traceback (most recent call last):
      File "/builddir/build/BUILD/psutil-release-5.9.5/psutil/tests/test_system.py", line 351, in test_cpu_times
        self.assertAlmostEqual(total, sum(times))
    AssertionError: 885725913.3 != 885725913.3000001 within 7 places (1.1920928955078125e-07 difference)
    ----------------------------------------------------------------------

Or:

    ======================================================================
    FAIL: psutil.tests.test_system.TestCpuAPIs.test_cpu_times
    ----------------------------------------------------------------------
    Traceback (most recent call last):
      File "/builddir/build/BUILD/psutil-release-5.9.5/psutil/tests/test_system.py", line 351, in test_cpu_times
        self.assertAlmostEqual(total, sum(times))
    AssertionError: 324284741.90999997 != 324284741.91 within 7 places (5.960464477539063e-08 difference)
    ----------------------------------------------------------------------

In CentOS Stream 10 builds on i686 and x86_64.
@giampaolo giampaolo merged commit 1f14eed into giampaolo:master Mar 15, 2024
10 of 15 checks passed
ddelange added a commit to ddelange/psutil that referenced this pull request Apr 9, 2024
…mpaolo-master

* 'master' of https://github.com/giampaolo/psutil:
  Fix workflow visibility badges in README (giampaolo#2399)
  OpenBSD: pid_exists() returns True for thread IDs (TIDs) (giampaolo#2395)
  pid_exists() and Process() disagree on whether a pid exists when ERROR_ACCESS_DENIED (giampaolo#2394)
  fix ruff errors
  Fix typos again (giampaolo#2388)
  fix doc style
  update HISTORY / CREDITS
  Include CoreFoundation/CoreFoundation.h (giampaolo#2364)
  Tests: Compare floats less strictly (giampaolo#2372)
  chore: build macOS arm64 wheels on macos-14 (giampaolo#2375)
  Update to fix OSX older version build failure (giampaolo#2379)
  Makefile: define a PYTHON_ENV_VARS var to use with the $PYTHON var.
  fix win tests
  refact serialization tests
  always use unittest.SkipTest where needed
  Add pickle support to psutil Exceptions (giampaolo#2380)
  enable ruff preview mode
ddelange added a commit to ddelange/psutil that referenced this pull request Apr 9, 2024
* giampaolo-master:
  Fix workflow visibility badges in README (giampaolo#2399)
  OpenBSD: pid_exists() returns True for thread IDs (TIDs) (giampaolo#2395)
  pid_exists() and Process() disagree on whether a pid exists when ERROR_ACCESS_DENIED (giampaolo#2394)
  fix ruff errors
  Fix typos again (giampaolo#2388)
  fix doc style
  update HISTORY / CREDITS
  Include CoreFoundation/CoreFoundation.h (giampaolo#2364)
  Tests: Compare floats less strictly (giampaolo#2372)
  chore: build macOS arm64 wheels on macos-14 (giampaolo#2375)
  Update to fix OSX older version build failure (giampaolo#2379)
  Makefile: define a PYTHON_ENV_VARS var to use with the $PYTHON var.
  fix win tests
  refact serialization tests
  always use unittest.SkipTest where needed
  Add pickle support to psutil Exceptions (giampaolo#2380)
  enable ruff preview mode
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants