mirror of
https://github.com/python/cpython.git
synced 2025-11-25 04:34:37 +00:00
reverted distutils its 3.1 state. All new work is now happening in disutils2, and distutils is now feature-frozen.
This commit is contained in:
parent
5db0c94072
commit
3679727939
64 changed files with 1626 additions and 1678 deletions
|
|
@ -1,6 +1,6 @@
|
|||
"""Tests for distutils.command.install_data."""
|
||||
import os
|
||||
import sys
|
||||
import os
|
||||
import unittest
|
||||
|
||||
from distutils.command.install_lib import install_lib
|
||||
|
|
@ -31,7 +31,9 @@ class InstallLibTestCase(support.TempdirManager,
|
|||
cmd.finalize_options()
|
||||
self.assertEquals(cmd.optimize, 2)
|
||||
|
||||
def _setup_byte_compile(self):
|
||||
@unittest.skipUnless(not sys.dont_write_bytecode,
|
||||
'byte-compile not supported')
|
||||
def test_byte_compile(self):
|
||||
pkg_dir, dist = self.create_dist()
|
||||
cmd = install_lib(dist)
|
||||
cmd.compile = cmd.optimize = 1
|
||||
|
|
@ -39,15 +41,8 @@ class InstallLibTestCase(support.TempdirManager,
|
|||
f = os.path.join(pkg_dir, 'foo.py')
|
||||
self.write_file(f, '# python file')
|
||||
cmd.byte_compile([f])
|
||||
return pkg_dir
|
||||
|
||||
@unittest.skipIf(sys.dont_write_bytecode, 'byte-compile not enabled')
|
||||
def test_byte_compile(self):
|
||||
pkg_dir = self._setup_byte_compile()
|
||||
if sys.flags.optimize < 1:
|
||||
self.assertTrue(os.path.exists(os.path.join(pkg_dir, 'foo.pyc')))
|
||||
else:
|
||||
self.assertTrue(os.path.exists(os.path.join(pkg_dir, 'foo.pyo')))
|
||||
self.assertTrue(os.path.exists(os.path.join(pkg_dir, 'foo.pyc')))
|
||||
self.assertTrue(os.path.exists(os.path.join(pkg_dir, 'foo.pyo')))
|
||||
|
||||
def test_get_outputs(self):
|
||||
pkg_dir, dist = self.create_dist()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue