summaryrefslogtreecommitdiffstats
path: root/Lib/packaging/tests/test_command_install_data.py
diff options
context:
space:
mode:
authorÉric Araujo <merwok@netwok.org>2011-11-06 09:48:55 (GMT)
committerÉric Araujo <merwok@netwok.org>2011-11-06 09:48:55 (GMT)
commit261ccdce4825535d4f6ea4bf09e9394bb751df20 (patch)
tree728ea760c788527786bd04fa44e66bf445f1d638 /Lib/packaging/tests/test_command_install_data.py
parenta963e0d917d71079910d31b69a1cc8a06b74edbe (diff)
downloadcpython-261ccdce4825535d4f6ea4bf09e9394bb751df20.zip
cpython-261ccdce4825535d4f6ea4bf09e9394bb751df20.tar.gz
cpython-261ccdce4825535d4f6ea4bf09e9394bb751df20.tar.bz2
Minor tweak to packaging tests.
When an option is changed on a command object, calling ensure_finalized for a second time will not run finalize_options again, because ensure_finalized is a no-op the second time. By resetting the finalized attribute, we can be sure that whatever computation takes place in finalize_options will happen again. (In test_command_clean, I removed two lines that were a no-op.)
Diffstat (limited to 'Lib/packaging/tests/test_command_install_data.py')
-rw-r--r--Lib/packaging/tests/test_command_install_data.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/packaging/tests/test_command_install_data.py b/Lib/packaging/tests/test_command_install_data.py
index 94d6a21..8d4373d 100644
--- a/Lib/packaging/tests/test_command_install_data.py
+++ b/Lib/packaging/tests/test_command_install_data.py
@@ -62,6 +62,7 @@ class InstallDataTestCase(support.TempdirManager,
# let's try with warn_dir one
cmd.warn_dir = True
+ cmd.finalized = False
cmd.ensure_finalized()
cmd.run()
@@ -80,6 +81,7 @@ class InstallDataTestCase(support.TempdirManager,
cmd.data_files = {one: '{inst}/one', two: '{inst2}/two',
three: '{inst3}/three'}
+ cmd.finalized = False
cmd.ensure_finalized()
cmd.run()