Skip to content

Commit

Permalink
Let _install_update_win() accept unknown kwargs (#127)
Browse files Browse the repository at this point in the history
* reproduce issue126 in test

* accept unknown kwargs in _install_update_win
  • Loading branch information
dennisvang authored Mar 12, 2024
1 parent e0bb893 commit c748155
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/tufup/utils/platform_specific.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ def _install_update_win(
log_file_name: Optional[str] = None,
robocopy_options_override: Optional[List[str]] = None,
process_creation_flags=None,
**kwargs, # noqa
):
"""
Create a batch script that moves files from src to dst, then run the
Expand Down
5 changes: 4 additions & 1 deletion tests/test_utils_platform_specific.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,10 @@ def test_run_bat_as_admin(self):
def test_install_update_no_purge(self):
extra_kwargs_strings = []
if ON_WINDOWS:
extra_kwargs_strings.extend(['as_admin=False', 'log_file_name=None'])
extra_kwargs_strings.extend(
# unknown_kwarg reproduces issue #126
['as_admin=False', 'log_file_name=None', 'unknown_kwarg=True']
)
# run the dummy app in a separate process
self.run_dummy_app(extra_kwargs_strings=extra_kwargs_strings)
# ensure file has been moved from src to dst
Expand Down

0 comments on commit c748155

Please sign in to comment.