Skip to content

Commit

Permalink
ci(package): NamedTemporaryFile Being Opened Twice (#2567)
Browse files Browse the repository at this point in the history
* Bumped aws-sam-translator to 1.27.0

* Bumped SAM CLI Version to 1.3.0

* Updated Reproducible Requirements

* Added Close to Packaged File

* Removed Debug Prints

* Removed Debug Vars

* Removed Another Debug Print

* Formatting

Co-authored-by: Wilton Wang <weichw@dev-dsk-weichw-2c-871e54ff.us-west-2.amazon.com>
  • Loading branch information
CoshUS and Wilton Wang committed Jan 29, 2021
1 parent 8b41424 commit 87576ec
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/integration/package/test_package_command_image.py
Expand Up @@ -131,6 +131,10 @@ def test_package_template_with_image_function_in_nested_application(self, templa
# when image function is not in main template, erc_repo_name does not show up in stdout
# here we download the nested application template file and verify its content
with tempfile.NamedTemporaryFile() as packaged_file, tempfile.TemporaryFile() as packaged_nested_file:
# https://docs.python.org/3/library/tempfile.html#tempfile.NamedTemporaryFile
# Closes the NamedTemporaryFile as on Windows NT or later, NamedTemporaryFile cannot be opened twice.
packaged_file.close()

command_list = self.get_command_list(
image_repository=self.ecr_repo_name,
template=template_path,
Expand Down

0 comments on commit 87576ec

Please sign in to comment.