summaryrefslogtreecommitdiff
path: root/tests/test_install_lib.py
diff options
context:
space:
mode:
authorBrett Cannon <brett@python.org>2015-04-13 14:21:02 -0400
committerBrett Cannon <brett@python.org>2015-04-13 14:21:02 -0400
commit6b108b8442eba8295a12655281e1b32b85a94a7b (patch)
treef4467d4bb4b90cf7d555a50c633dadb10f5b2eb6 /tests/test_install_lib.py
parent5c5812dfa66df29d6b59eeb7044907f0c02f6ff8 (diff)
downloadpython-setuptools-git-6b108b8442eba8295a12655281e1b32b85a94a7b.tar.gz
Issue #23731: Implement PEP 488.
The concept of .pyo files no longer exists. Now .pyc files have an optional `opt-` tag which specifies if any extra optimizations beyond the peepholer were applied.
Diffstat (limited to 'tests/test_install_lib.py')
-rw-r--r--tests/test_install_lib.py13
1 files changed, 6 insertions, 7 deletions
diff --git a/tests/test_install_lib.py b/tests/test_install_lib.py
index 40dd1a95..5378aa82 100644
--- a/tests/test_install_lib.py
+++ b/tests/test_install_lib.py
@@ -44,12 +44,11 @@ class InstallLibTestCase(support.TempdirManager,
f = os.path.join(project_dir, 'foo.py')
self.write_file(f, '# python file')
cmd.byte_compile([f])
- pyc_file = importlib.util.cache_from_source('foo.py',
- debug_override=True)
- pyo_file = importlib.util.cache_from_source('foo.py',
- debug_override=False)
+ pyc_file = importlib.util.cache_from_source('foo.py', optimization='')
+ pyc_opt_file = importlib.util.cache_from_source('foo.py',
+ optimization=cmd.optimize)
self.assertTrue(os.path.exists(pyc_file))
- self.assertTrue(os.path.exists(pyo_file))
+ self.assertTrue(os.path.exists(pyc_opt_file))
def test_get_outputs(self):
project_dir, dist = self.create_dist()
@@ -66,8 +65,8 @@ class InstallLibTestCase(support.TempdirManager,
cmd.distribution.packages = ['spam']
cmd.distribution.script_name = 'setup.py'
- # get_outputs should return 4 elements: spam/__init__.py, .pyc and
- # .pyo, foo.import-tag-abiflags.so / foo.pyd
+ # get_outputs should return 4 elements: spam/__init__.py and .pyc,
+ # foo.import-tag-abiflags.so / foo.pyd
outputs = cmd.get_outputs()
self.assertEqual(len(outputs), 4, outputs)