diff options
author | Giampaolo Rodola <g.rodola@gmail.com> | 2020-05-17 03:31:46 +0200 |
---|---|---|
committer | Giampaolo Rodola <g.rodola@gmail.com> | 2020-05-17 03:31:46 +0200 |
commit | 83ff003faa808319e69ceb6c95beb9d40f4a901d (patch) | |
tree | 5dfed158a9ecc7b402f6a1265f3ee61288fa1285 | |
parent | 48a507d2f42dd0028908db9973095e3d7af60404 (diff) | |
download | psutil-83ff003faa808319e69ceb6c95beb9d40f4a901d.tar.gz |
fix tests
-rw-r--r-- | psutil/tests/__init__.py | 2 | ||||
-rwxr-xr-x | psutil/tests/test_unicode.py | 6 | ||||
-rw-r--r-- | scripts/internal/download_wheels.py | 2 |
3 files changed, 4 insertions, 6 deletions
diff --git a/psutil/tests/__init__.py b/psutil/tests/__init__.py index e13b6f0f..8a086b6b 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(prefix=TESTFN_PREFIX, suffix="", dir=None): +def get_testfn(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_unicode.py b/psutil/tests/test_unicode.py index 38d252dd..c2128c83 100755 --- a/psutil/tests/test_unicode.py +++ b/psutil/tests/test_unicode.py @@ -230,8 +230,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(prefix="", suffix=suffix) + name = self.get_testfn(suffix=self.funky_suffix) try: sock = bind_unix_socket(name) except UnicodeEncodeError: @@ -256,8 +255,7 @@ class _BaseFSAPIsTests(object): return conn raise ValueError("connection not found") - suffix = os.path.basename(self.funky_name) - name = self.get_testfn(prefix="", suffix=suffix) + name = self.get_testfn(suffix=self.funky_suffix) try: sock = bind_unix_socket(name) except UnicodeEncodeError: diff --git a/scripts/internal/download_wheels.py b/scripts/internal/download_wheels.py index ec805902..30b19413 100644 --- a/scripts/internal/download_wheels.py +++ b/scripts/internal/download_wheels.py @@ -76,7 +76,6 @@ def rename_27_wheels(): def extract(): with zipfile.ZipFile(OUTFILE, 'r') as zf: zf.extractall('dist') - rename_27_wheels() def print_wheels(): @@ -132,6 +131,7 @@ def run(): download_zip(data['artifacts'][0]['archive_download_url']) os.mkdir('dist') extract() + rename_27_wheels() print_wheels() |