anfedorov / psutil

Automatically exported from code.google.com/p/psutil
Other
0 stars 0 forks source link

test_create_time() failure on OS X 10.8.4 #395

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
FAIL: test_fetch_all (__main__.TestFetchAllProcesses)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test/test_psutil.py", line 1952, in test_fetch_all
    self.fail(''.join(failures))
AssertionError:     
    ======================================================================
    FAIL: test_create_time (proc=psutil.Process(pid=0, name='kernel_task'), ret=1370991995.147368))
    ----------------------------------------------------------------------
    Traceback (most recent call last):
      File "test/test_psutil.py", line 1937, in test_fetch_all
        meth(ret)
      File "test/test_psutil.py", line 1985, in create_time
        self.assertGreaterEqual(ret, psutil.BOOT_TIME)
      File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/unittest/case.py", line 944, in assertGreaterEqual
        self.fail(self._formatMessage(msg, standardMsg))
      File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/unittest/case.py", line 408, in fail
        raise self.failureException(msg)
    AssertionError: 1370991995.147368 not greater than or equal to 1370992000.0    

Looks like this is just a rounding difference comparing to BOOT_TIME.

Original issue reported on code.google.com by jlo...@gmail.com on 18 Jun 2013 at 12:38

GoogleCodeExporter commented 8 years ago
Fixed in revision 9ece704f0982.

Original comment by g.rodola on 10 Jul 2013 at 2:16