diff options
author | Zac Medico <zmedico@gentoo.org> | 2010-08-17 06:54:42 -0700 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2010-08-17 06:54:42 -0700 |
commit | 0a83efdca21ef35da38e9cc8e08ffe4b9f9ae08e (patch) | |
tree | 5ebd51b69ee63b57f07b6a681e900e3cf2fca3c4 | |
parent | 4a7eed6eb98dadbbbdadd48b67f902431ee82e8e (diff) | |
download | portage-0a83efdca21ef35da38e9cc8e08ffe4b9f9ae08e.tar.gz portage-0a83efdca21ef35da38e9cc8e08ffe4b9f9ae08e.tar.bz2 portage-0a83efdca21ef35da38e9cc8e08ffe4b9f9ae08e.zip |
Write compiled bytecodes to /dev/null, rather than write and unlink
them.
-rw-r--r-- | pym/portage/tests/lint/test_compile_modules.py | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/pym/portage/tests/lint/test_compile_modules.py b/pym/portage/tests/lint/test_compile_modules.py index 5b86fcfb2..273979b89 100644 --- a/pym/portage/tests/lint/test_compile_modules.py +++ b/pym/portage/tests/lint/test_compile_modules.py @@ -51,13 +51,4 @@ class CompileModulesTestCase(TestCase): cfile = imp.cache_from_source(cfile) except AttributeError: cfile += (__debug__ and 'c' or 'o') - py_compile.compile(x, cfile=cfile, doraise=True) - os.unlink(cfile) - cfile_parent_dir = os.path.dirname(cfile) - if os.path.basename(cfile_parent_dir) == '__pycache__': - # Python >=3.2 - try: - os.rmdir(cfile_parent_dir) - except OSError: - # __pycache__ directory is non-empty. - pass + py_compile.compile(x, cfile='/dev/null', doraise=True) |