mirror of
https://github.com/python/cpython.git
synced 2025-09-26 10:19:53 +00:00
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.)
This commit is contained in:
parent
a963e0d917
commit
261ccdce48
4 changed files with 4 additions and 3 deletions
|
@ -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()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue