summaryrefslogtreecommitdiff
path: root/psutil/tests
Commit message (Collapse)AuthorAgeFilesLines
* refactoring / rename varsGiampaolo Rodola2020-04-291-12/+10
|
* Test sub-processes cleanup and ProcessTestCase class (#1739)Giampaolo Rodola2020-04-2812-215/+260
|
* show status() in __repr__Giampaolo Rodola2020-04-281-0/+2
|
* create_zombie_proc() make it return parent so that we can kill zombieGiampaolo Rodola2020-04-284-19/+27
|
* psutil.Popen: inherit from subprocess + support wait(timeout=...) parameter ↵Giampaolo Rodola2020-04-284-16/+37
| | | | (#1736)
* add new termina() test utilGiampaolo Rodola2020-04-271-56/+73
|
* Merge branch 'master' into devreap-childrenGiampaolo Rodola2020-04-2618-113/+291
|\
| * Parallel tests (UNIX) (#1709)Giampaolo Rodola2020-04-2618-113/+291
| |
* | rename varGiampaolo Rodola2020-04-265-45/+45
|/
* trick to execute atexit functions in case of SIGTERMGiampaolo Rodola2020-04-251-21/+34
|
* Get rid of TESTFN global variable (#1734)Giampaolo Rodola2020-04-2410-355/+300
|
* Backport python 3 super() (#1733)Giampaolo Rodola2020-04-244-10/+9
|
* MemoryLeakTest class enhancements (#1731)Giampaolo Rodola2020-04-234-436/+548
|
* Fix detecting empty result in TestSystemAPIs.test_users() (#1699)Michał Górny2020-02-211-2/+2
|
* Git hook for renamed/added/deleted files + flake8 print() + tidelift (#1704)Giampaolo Rodola2020-02-211-1/+1
|
* revert #1667 process_iter() new_only paramGiampaolo Rodola2020-02-181-16/+0
| | | | | | | | | | On a second thought I realized that process_iter() uses a global variable, so it's not thread safe. That means that if the are 2 threads using it, the first thread one calling the function (+ consume the iterator), will "steal" the processes of the second thread. psutil.cpu_percent() has the same problem. That means we have a problem can't solve with the current API and requires a lot of thinking on how to solve it as it's not obvious.
* #1053 fix syntax incompatible with py2.6Giampaolo Rodola2020-02-161-2/+1
|
* remove deprecation test: it fails intermittently because warnings uses a ↵Giampaolo Rodola2020-02-161-17/+0
| | | | global state
* get rid of pip_install() code for py2; move everything in runner.pyGiampaolo Rodola2020-02-153-84/+17
|
* point all shebangs to python 3Giampaolo Rodola2020-02-1516-16/+16
|
* refactor print colors utilsGiampaolo Rodola2020-02-152-76/+25
|
* divide test_system.py unit tests in multiple classesGiampaolo Rodola2020-02-141-183/+200
|
* fix testsGiampaolo Rodola2020-02-132-2/+6
|
* #1659: provide error message in case of bugged PYPY2 versionGiampaolo Rodola2020-02-141-4/+0
|
* #1681, revert 00a3398Giampaolo Rodola2020-02-131-19/+0
|
* fix pypy on LinuxGiampaolo Rodola2020-02-121-2/+2
|
* refactor docGiampaolo Rodola2020-02-121-5/+26
|
* Add support for PyPy on Windows (#1686)Giampaolo Rodola2020-02-116-12/+35
|
* fix #1681 / linux / disk_partitions: show swapGiampaolo Rodola2020-02-111-0/+16
|
* skip memleak tests on PyPy: they are unreliable probably because of the JITGiampaolo Rodola2020-02-102-5/+7
|
* Fix test errors for PYPY.Giampaolo Rodola2020-02-092-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It looks like PYPY implementation has some issues with strings (or maybe it's a subprocess bug?). Anyway, this is the full output: PYTHONWARNINGS=all PSUTIL_TESTING=1 PSUTIL_DEBUG=1 pypy3 -c "import psutil.tests.runner as r; r.run(last_failed=True)" psutil.tests.test_unicode.TestFSAPIsWithInvalidPath.test_proc_cmdline ... /home/giampaolo/svn/psutil/@psutil-test-30050f��: error while loading shared libraries: libpypy3-c.so: cannot open shared object file: No such file or directory FAIL psutil.tests.test_unicode.TestFSAPIsWithInvalidPath.test_proc_exe ... /home/giampaolo/svn/psutil/@psutil-test-30050f��: error while loading shared libraries: libpypy3-c.so: cannot open shared object file: No such file or directory FAIL psutil.tests.test_unicode.TestFSAPIsWithInvalidPath.test_proc_name ... /home/giampaolo/svn/psutil/@psutil-test-30050f��: error while loading shared libraries: libpypy3-c.so: cannot open shared object file: No such file or directory FAIL psutil.tests.test_process.TestProcess.test_long_cmdline ... /home/giampaolo/svn/psutil/@psutil-test-30050: error while loading shared libraries: libpypy3-c.so: cannot open shared object file: No such file or directory FAIL psutil.tests.test_process.TestProcess.test_long_name ... /home/giampaolo/svn/psutil/@psutil-test-3005001234567890123456789: error while loading shared libraries: libpypy3-c.so: cannot open shared object file: No such file or directory FAIL psutil.tests.test_process.TestProcess.test_prog_w_funky_name ... /home/giampaolo/svn/psutil/@psutil-test-30050foo bar ): error while loading shared libraries: libpypy3-c.so: cannot open shared object file: No such file or directory FAIL ====================================================================== FAIL: psutil.tests.test_unicode.TestFSAPIsWithInvalidPath.test_proc_cmdline ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/giampaolo/svn/psutil/psutil/tests/test_unicode.py", line 184, in test_proc_cmdline self.assertEqual(cmdline, [self.funky_name]) AssertionError: Lists differ: [] != ['/home/giampaolo/svn/psutil/@psutil-test-30050f\udcc0\udc80'] Second list contains 1 additional elements. First extra element 0: '/home/giampaolo/svn/psutil/@psutil-test-30050f\udcc0\udc80' - [] + ['/home/giampaolo/svn/psutil/@psutil-test-30050f\udcc0\udc80'] ====================================================================== FAIL: psutil.tests.test_unicode.TestFSAPIsWithInvalidPath.test_proc_exe ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/giampaolo/svn/psutil/psutil/tests/test_unicode.py", line 168, in test_proc_exe os.path.normcase(self.funky_name)) AssertionError: '' != '/home/giampaolo/svn/psutil/@psutil-test-30050f\udcc0\udc80' + /home/giampaolo/svn/psutil/@psutil-test-30050f\udcc0\udc80 ====================================================================== FAIL: psutil.tests.test_unicode.TestFSAPIsWithInvalidPath.test_proc_name ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/giampaolo/svn/psutil/psutil/tests/test_unicode.py", line 175, in test_proc_name self.assertEqual(name, os.path.basename(self.funky_name)) AssertionError: '@psutil-test-30' != '@psutil-test-30050f\udcc0\udc80' - @psutil-test-30 + @psutil-test-30050f\udcc0\udc80 ? ++++++ ====================================================================== FAIL: psutil.tests.test_process.TestProcess.test_long_cmdline ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/giampaolo/svn/psutil/psutil/tests/test_process.py", line 736, in test_long_cmdline self.assertEqual(p.cmdline(), cmdline) AssertionError: Lists differ: [] != ['/home/giampaolo/svn/psutil/@psutil-test-[282 chars]789'] Second list contains 21 additional elements. First extra element 0: '/home/giampaolo/svn/psutil/@psutil-test-30050' - [] + ['/home/giampaolo/svn/psutil/@psutil-test-30050', + '0123456789', + '0123456789', + '0123456789', + '0123456789', + '0123456789', + '0123456789', + '0123456789', + '0123456789', + '0123456789', + '0123456789', + '0123456789', + '0123456789', + '0123456789', + '0123456789', + '0123456789', + '0123456789', + '0123456789', + '0123456789', + '0123456789', + '0123456789'] ====================================================================== FAIL: psutil.tests.test_process.TestProcess.test_long_name ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/giampaolo/svn/psutil/psutil/tests/test_process.py", line 750, in test_long_name self.assertEqual(p.name(), os.path.basename(long_name)) AssertionError: '@psutil-test-30' != '@psutil-test-3005001234567890123456789' - @psutil-test-30 + @psutil-test-3005001234567890123456789 ====================================================================== FAIL: psutil.tests.test_process.TestProcess.test_prog_w_funky_name ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/giampaolo/svn/psutil/psutil/tests/test_process.py", line 780, in test_prog_w_funky_name self.assertEqual(p.cmdline(), cmdline) AssertionError: Lists differ: [] != ['/home/giampaolo/svn/psutil/@psutil-test-[102 chars], ''] Second list contains 7 additional elements. First extra element 0: '/home/giampaolo/svn/psutil/@psutil-test-30050foo bar )' - [] + ['/home/giampaolo/svn/psutil/@psutil-test-30050foo bar )', + '-c', + 'import time; [time.sleep(0.01) for x in range(3000)];arg1', + 'arg2', + '', + 'arg3', + ''] ----------------------------------------------------------------------
* [Linux] disk_io_counters() ValueError when parsing /sys/block (#1684)Giampaolo Rodola2020-02-091-21/+2
| | | | | | | | | | | | | | | | | | | Fixes: ``` ====================================================================== ERROR: psutil.tests.test_linux.TestSystemDiskIoCounters.test_emulate_use_sysfs ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/giampaolo/svn/psutil/psutil/tests/test_linux.py", line 1195, in test_emulate_use_sysfs wsysfs = psutil.disk_io_counters(perdisk=True) File "/home/giampaolo/svn/psutil/psutil/__init__.py", line 2065, in disk_io_counters rawdict = _psplatform.disk_io_counters(**kwargs) File "/home/giampaolo/svn/psutil/psutil/_pslinux.py", line 1124, in disk_io_counters for entry in gen: File "/home/giampaolo/svn/psutil/psutil/_pslinux.py", line 1110, in read_sysfs wbytes, wtime, _, busy_time, _) = map(int, fields) ValueError: too many values to unpack (expected 11) ```
* [Windows] use NtQuerySystemInformation to determine process exe() (#1677)Giampaolo Rodola2020-02-015-53/+21
|
* Properly handle PID type in C (#1672)Giampaolo Rodola2020-01-297-24/+26
|
* fix Cirrus failureGiampaolo Rodola2020-01-242-3/+5
|
* Add CI testing for FreeBSD (#1671)Giampaolo Rodola2020-01-248-42/+40
|
* Add *new_only* parameter for process_iter() (#1667)Giampaolo Rodola2020-01-181-1/+17
|
* AD script: print AD percentage + elapsed timeGiampaolo Rodola2020-01-161-1/+1
|
* properly cleanup C threadGiampaolo Rodola2020-01-141-1/+1
|
* [Windows] rewrite of open_files() (#1660)Giampaolo Rodola2020-01-091-1/+1
|
* add more types testsGiampaolo Rodola2020-01-071-10/+51
|
* add contract tests for IOPRIO_ win constantsGiampaolo Rodola2020-01-071-7/+18
|
* refactoring test_contracts.pyGiampaolo Rodola2020-01-071-24/+27
|
* fix some win testsGiampaolo Rodola2020-01-062-2/+5
|
* fix #1656: [Windows] Process.memory_full_info() raises AccessDenied even for ↵Giampaolo Rodola2020-01-061-1/+1
| | | | the current user and os.getpid()
* fix open_files() tests broken on windows due to case sensitivenessGiampaolo Rodola2020-01-032-11/+13
|
* small refactoringGiampaolo Rodola2020-01-021-6/+3
|
* credits for #1648Giampaolo Rodola2019-12-281-0/+1
|
* HERE: use realpath() instead of abspath() because of failures seen in ↵Giampaolo Rodola2019-12-181-2/+3
| | | | https://github.com/giampaolo/psutil/pull/1638#issuecomment-567013054
* Fix simple typo: whish -> wish (#1640)Tim Gates2019-12-171-1/+1
| | | Closes #1639