summaryrefslogtreecommitdiff
path: root/psutil/tests/test_unicode.py
diff options
context:
space:
mode:
authorGiampaolo Rodola <g.rodola@gmail.com>2020-02-09 22:11:51 +0100
committerGiampaolo Rodola <g.rodola@gmail.com>2020-02-09 22:11:51 +0100
commit17b702945351f91bb3dc61010eddf26b68fd596b (patch)
tree5b1f33e89d537b91251fc844275167839589f3d8 /psutil/tests/test_unicode.py
parent05758f6978aefea709150898ae285b3ff3688c7c (diff)
downloadpsutil-17b702945351f91bb3dc61010eddf26b68fd596b.tar.gz
Fix test errors for PYPY.
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', + ''] ----------------------------------------------------------------------
Diffstat (limited to 'psutil/tests/test_unicode.py')
-rw-r--r--psutil/tests/test_unicode.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/psutil/tests/test_unicode.py b/psutil/tests/test_unicode.py
index 91395ebf..eecd7dc4 100644
--- a/psutil/tests/test_unicode.py
+++ b/psutil/tests/test_unicode.py
@@ -298,6 +298,7 @@ class TestFSAPIs(_BaseFSAPIsTests, unittest.TestCase):
@unittest.skipIf(PYPY and TRAVIS, "unreliable on PYPY + TRAVIS")
@unittest.skipIf(MACOS and TRAVIS, "unreliable on TRAVIS") # TODO
+@unittest.skipIf(PYPY, "unreliable on PYPY")
@unittest.skipIf(not subprocess_supports_unicode(INVALID_NAME),
"subprocess can't deal with invalid unicode")
class TestFSAPIsWithInvalidPath(_BaseFSAPIsTests, unittest.TestCase):