diff options
author | Giampaolo Rodola <g.rodola@gmail.com> | 2020-05-17 03:16:26 +0200 |
---|---|---|
committer | Giampaolo Rodola <g.rodola@gmail.com> | 2020-05-17 03:16:26 +0200 |
commit | 48a507d2f42dd0028908db9973095e3d7af60404 (patch) | |
tree | 81c7b0c227a9e20dcb1016002c0fc20e1ceaea02 | |
parent | 5ad5e8d3f87ef6810dec43a6ac414f7bba5a6db6 (diff) | |
download | psutil-48a507d2f42dd0028908db9973095e3d7af60404.tar.gz |
try to fix some failures
-rw-r--r-- | .github/workflows/build_wheels.yml (renamed from .github/workflows/build_wheel.yml) | 2 | ||||
-rw-r--r-- | psutil/tests/__init__.py | 2 | ||||
-rwxr-xr-x | psutil/tests/test_linux.py | 1 | ||||
-rwxr-xr-x | psutil/tests/test_system.py | 3 | ||||
-rwxr-xr-x | psutil/tests/test_unicode.py | 5 | ||||
-rwxr-xr-x | setup.py | 8 |
6 files changed, 11 insertions, 10 deletions
diff --git a/.github/workflows/build_wheel.yml b/.github/workflows/build_wheels.yml index 7d230b90..0f922b34 100644 --- a/.github/workflows/build_wheel.yml +++ b/.github/workflows/build_wheels.yml @@ -1,4 +1,4 @@ -name: Build wheel +name: Build wheels on: [push, pull_request] diff --git a/psutil/tests/__init__.py b/psutil/tests/__init__.py index 8a086b6b..e13b6f0f 100644 --- a/psutil/tests/__init__.py +++ b/psutil/tests/__init__.py @@ -812,7 +812,7 @@ def create_exe(outpath, c_code=None): os.chmod(outpath, st.st_mode | stat.S_IEXEC) -def get_testfn(suffix="", dir=None): +def get_testfn(prefix=TESTFN_PREFIX, suffix="", dir=None): """Return an absolute pathname of a file or dir that did not exist at the time this call is made. Also schedule it for safe deletion at interpreter exit. It's technically racy but probably diff --git a/psutil/tests/test_linux.py b/psutil/tests/test_linux.py index 9cc518bb..735b4c9e 100755 --- a/psutil/tests/test_linux.py +++ b/psutil/tests/test_linux.py @@ -1376,6 +1376,7 @@ class TestMisc(PsutilTestCase): try: p = psutil.Process() tid = p.threads()[1].id + self.assertNotEqual(p.pid, tid) assert not psutil.pid_exists(tid), tid pt = psutil.Process(tid) pt.as_dict() diff --git a/psutil/tests/test_system.py b/psutil/tests/test_system.py index 49eb2d0b..4d00f49a 100755 --- a/psutil/tests/test_system.py +++ b/psutil/tests/test_system.py @@ -619,7 +619,8 @@ class TestDiskAPIs(PsutilTestCase): try: os.stat(disk.mountpoint) except OSError as err: - if (GITHUB_WHEELS or TRAVIS) and MACOS and err.errno == errno.EIO: + if (GITHUB_WHEELS or TRAVIS) and \ + MACOS and err.errno == errno.EIO: continue # http://mail.python.org/pipermail/python-dev/ # 2012-June/120787.html diff --git a/psutil/tests/test_unicode.py b/psutil/tests/test_unicode.py index ec5ef4e3..38d252dd 100755 --- a/psutil/tests/test_unicode.py +++ b/psutil/tests/test_unicode.py @@ -108,7 +108,6 @@ from psutil.tests import spawn_testproc from psutil.tests import terminate from psutil.tests import TESTFN_PREFIX from psutil.tests import TRAVIS -from psutil.tests import GITHUB_WHEELS from psutil.tests import UNICODE_SUFFIX from psutil.tests import unittest import psutil @@ -232,7 +231,7 @@ class _BaseFSAPIsTests(object): @unittest.skipIf(not POSIX, "POSIX only") def test_proc_connections(self): suffix = os.path.basename(self.funky_name) - name = self.get_testfn(suffix=suffix) + name = self.get_testfn(prefix="", suffix=suffix) try: sock = bind_unix_socket(name) except UnicodeEncodeError: @@ -258,7 +257,7 @@ class _BaseFSAPIsTests(object): raise ValueError("connection not found") suffix = os.path.basename(self.funky_name) - name = self.get_testfn(suffix=suffix) + name = self.get_testfn(prefix="", suffix=suffix) try: sock = bind_unix_socket(name) except UnicodeEncodeError: @@ -69,10 +69,10 @@ if POSIX: extras_require = {"test": [ "ipaddress; python_version < '3.0'", - "mock; python_version < '3.0'", - "pypiwin32; sys.platform == 'win32'", - "wmi; sys.platform == 'win32'", - "enum34; python_version <= '3.4'",]} + "mock; python_version < '3.0'", + "pypiwin32; sys.platform == 'win32'", + "wmi; sys.platform == 'win32'", + "enum34; python_version <= '3.4'"]} def get_version(): |