The file created (and opened) by NamedTemporaryFile will be used in update_changelog_sections later and the second-time open() on the temp file will result in a permission denied on Windows because of Python implementation. The issue has been discussed here: https://bugs.python.org/issue14243
And one workaround talked about in the discussion is to pass "delete=False".
Here is the error messages for the test failure:
======================================================================
ERROR: test_update_changelog_unicode (test.test_package_version.PackageVersionTest)
Test that updating the changelog does not throw an exception on unicode characters.
Traceback (most recent call last):
File "c:\workspace\catkin_pkg\test\test_package_version.py", line 87, in test_update_changelog_unicode
update_changelog_sections(missing_changelogs_but_forthcoming, '1.0.0')
File "c:\workspace\catkin_pkg\src\catkin_pkg\package_version.py", line 160, in update_changelog_sections
with open(changelog_path, 'wb') as f:
IOError: [Errno 13] Permission denied: 'c:\users\admin\appdata\local\temp\tmpvchrip'
The file created (and opened) by NamedTemporaryFile will be used in update_changelog_sections later and the second-time open() on the temp file will result in a permission denied on Windows because of Python implementation. The issue has been discussed here: https://bugs.python.org/issue14243
And one workaround talked about in the discussion is to pass "delete=False".
Here is the error messages for the test failure:
====================================================================== ERROR: test_update_changelog_unicode (test.test_package_version.PackageVersionTest) Test that updating the changelog does not throw an exception on unicode characters.
Traceback (most recent call last): File "c:\workspace\catkin_pkg\test\test_package_version.py", line 87, in test_update_changelog_unicode update_changelog_sections(missing_changelogs_but_forthcoming, '1.0.0') File "c:\workspace\catkin_pkg\src\catkin_pkg\package_version.py", line 160, in update_changelog_sections with open(changelog_path, 'wb') as f: IOError: [Errno 13] Permission denied: 'c:\users\admin\appdata\local\temp\tmpvchrip'