diff options
author | Giampaolo Rodola <g.rodola@gmail.com> | 2017-05-03 00:57:42 +0200 |
---|---|---|
committer | Giampaolo Rodola <g.rodola@gmail.com> | 2017-05-03 00:57:42 +0200 |
commit | 68588c3f97d7609c1e8feb6da24d97d06dfbaed0 (patch) | |
tree | 87a6eb1a31df58cae03eb58ad3e8f76d05382ba9 | |
parent | 4c07213c20840325eec14c24182d64b5abaae2d0 (diff) | |
download | psutil-68588c3f97d7609c1e8feb6da24d97d06dfbaed0.tar.gz |
skip memory_maps unicode test: ctypes opens a message box which blocks the test suite
-rw-r--r-- | psutil/tests/test_unicode.py | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/psutil/tests/test_unicode.py b/psutil/tests/test_unicode.py index cf1c02af..ce881eac 100644 --- a/psutil/tests/test_unicode.py +++ b/psutil/tests/test_unicode.py @@ -110,16 +110,6 @@ def subprocess_supports_unicode(name): return True -def ctypes_supports_unicode(name): - if PY3: - return True - try: - with copyload_shared_lib(): - pass - except UnicodeEncodeError: - return False - - # An invalid unicode string. if PY3: INVALID_NAME = (TESTFN.encode('utf8') + b"f\xc0\x80").decode( @@ -252,10 +242,10 @@ class _BaseFSAPIsTests(object): psutil.disk_usage(self.funky_name) @unittest.skipIf(not HAS_MEMORY_MAPS, "not supported") + @unittest.skipIf(not PY3, "ctypes opens err msg box on Python 2") def test_memory_maps(self): - if not ctypes_supports_unicode(self.funky_name): - raise unittest.SkipTest("ctypes can't handle unicode") - + # XXX: on Python 2, using ctypes.CDLL with a unicode path + # opens a message box which blocks the test run. with copyload_shared_lib(dst_prefix=self.funky_name) as funky_path: def normpath(p): return os.path.realpath(os.path.normcase(p)) |