diff --git a/psutil/tests/test_unicode.py b/psutil/tests/test_unicode.py index bbb763f31..c2a2f8479 100755 --- a/psutil/tests/test_unicode.py +++ b/psutil/tests/test_unicode.py @@ -207,7 +207,7 @@ def test_proc_cwd(self): def test_proc_open_files(self): p = psutil.Process() start = set(p.open_files()) - with open(self.funky_name, 'wb'): + with open(self.funky_name, 'rb'): new = set(p.open_files()) path = (new - start).pop().path self.assertIsInstance(path, str) diff --git a/scripts/internal/generate_manifest.py b/scripts/internal/generate_manifest.py index 8b6b4f5fa..3511b7492 100755 --- a/scripts/internal/generate_manifest.py +++ b/scripts/internal/generate_manifest.py @@ -12,6 +12,10 @@ import subprocess +IGNORED_EXTS = ('.png', '.jpg', '.jpeg') +IGNORED_FILES = ('.travis.yml', 'appveyor.yml') + + def sh(cmd): return subprocess.check_output( cmd, shell=True, universal_newlines=True).strip() @@ -21,8 +25,8 @@ def main(): files = sh("git ls-files").split('\n') for file in files: if file.startswith('.ci/') or \ - os.path.splitext(file)[1] in ('.png', '.jpg') or \ - file in ('.travis.yml', 'appveyor.yml'): + os.path.splitext(file)[1].lower() in IGNORED_EXTS or \ + file in IGNORED_FILES: continue print("include " + file)