This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: test_shutil.test_make_archive() fails on Windows 8.1
Type: Stage: resolved
Components: Tests Versions: Python 3.6, Python 3.4, Python 3.5, Python 2.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: serhiy.storchaka Nosy List: ned.deily, python-dev, ronaldoussoren, serhiy.storchaka, vstinner, zach.ware
Priority: normal Keywords:

Created on 2015-09-07 09:05 by vstinner, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Messages (9)
msg250089 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2015-09-07 09:05
It looks like test_shutil fails since the changeset 4383ff47ffface248c8eabedf0f4c3bdab11f535:
http://buildbot.python.org/all/builders/AMD64%20Windows8.1%20Non-Debug%203.x/builds/315/

======================================================================
FAIL: test_make_tarball (test.test_shutil.TestShutil)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "B:\buildarea\3.x.ware-win81-release\build\lib\test\test_shutil.py", line 987, in test_make_tarball
    self.assertTrue(os.path.isfile(tarball))
AssertionError: False is not true
msg250090 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2015-09-07 09:06
The test pass on Windows 7 and Windows 10 buildbots.
msg250091 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2015-09-07 09:19
Strange, the bug is only on one buildbot. It pass on the Windows 8 buildbot:
http://buildbot.python.org/all/builders/AMD64%20Windows8%203.x/builds/1249
msg250097 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2015-09-07 10:58
New changeset 7bd6b8076c48 by Serhiy Storchaka in branch '3.4':
Explicitly test archive name in shutil.make_archive() tests to expose failure
https://hg.python.org/cpython/rev/7bd6b8076c48

New changeset beda04bf5991 by Serhiy Storchaka in branch '2.7':
Explicitly test archive name in shutil.make_archive() tests to expose failure
https://hg.python.org/cpython/rev/beda04bf5991

New changeset f842c2b710ed by Serhiy Storchaka in branch '3.5':
Explicitly test archive name in shutil.make_archive() tests to expose failure
https://hg.python.org/cpython/rev/f842c2b710ed

New changeset 738e227d0891 by Serhiy Storchaka in branch 'default':
Explicitly test archive name in shutil.make_archive() tests to expose failure
https://hg.python.org/cpython/rev/738e227d0891
msg250098 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2015-09-07 11:00
This is a consequence of 9774088c8ff7. I don't know why the test fails.

Added explicit checks for archive name.
msg250119 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2015-09-07 17:00
New changeset 58937cd19a85 by Serhiy Storchaka in branch '3.4':
Issue #25018: Fixed testing shutil.make_archive() with relative base_name on
https://hg.python.org/cpython/rev/58937cd19a85

New changeset d9c4b35e3fdc by Serhiy Storchaka in branch '2.7':
Issue #25018: Fixed testing shutil.make_archive() with relative base_name on
https://hg.python.org/cpython/rev/d9c4b35e3fdc

New changeset 4312b6549590 by Serhiy Storchaka in branch '3.5':
Issue #25018: Fixed testing shutil.make_archive() with relative base_name on
https://hg.python.org/cpython/rev/4312b6549590

New changeset b076b62731b7 by Serhiy Storchaka in branch 'default':
Issue #25018: Fixed testing shutil.make_archive() with relative base_name on
https://hg.python.org/cpython/rev/b076b62731b7
msg250120 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2015-09-07 17:18
I hope that I preserved the intention of the test. It tested relative make_archive() with base_name. Original test first changed working directory and drive (to the same drive as the drive of output file) and then called private function _make_tarball(). After my refactoring the code became call make_archive() that resolve base_name before changing current directory. The peculiarity of the buildbot is that it crates temporary files on different drive that current drive, and relative base_name were resolved to wrong absolute name.

Now the code changes current directory before calling make_archive() with relative base_name argument and the test makes sense on non-Windows. Also added similar test for zip format.
msg250127 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2015-09-07 20:20
The build bot is green.
msg250171 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2015-09-08 08:09
Tests failed on Mac OS X.
http://buildbot.python.org/all/builders/AMD64%20Snow%20Leop%203.5/builds/254/steps/test/logs/stdio
======================================================================
FAIL: test_make_tarball (test.test_shutil.TestShutil)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/buildbot/buildarea/3.5.murray-snowleopard/build/Lib/test/test_shutil.py", line 986, in test_make_tarball
    self.assertEqual(tarball, base_name + '.tar.gz')
AssertionError: '/private/var/folders/0-/0-cd8XI2HU86vol3rX[38 chars]r.gz' != '/var/folders/0-/0-cd8XI2HU86vol3rXsMTU+++T[30 chars]r.gz'
- /private/var/folders/0-/0-cd8XI2HU86vol3rXsMTU+++TY/-Tmp-/tmpy8jleen7/archive.tar.gz
? --------
+ /var/folders/0-/0-cd8XI2HU86vol3rXsMTU+++TY/-Tmp-/tmpy8jleen7/archive.tar.gz


======================================================================
FAIL: test_make_zipfile (test.test_shutil.TestShutil)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/buildbot/buildarea/3.5.murray-snowleopard/build/Lib/test/test_shutil.py", line 1075, in test_make_zipfile
    self.assertEqual(res, base_name + '.zip')
AssertionError: '/private/var/folders/0-/0-cd8XI2HU86vol3rX[35 chars].zip' != '/var/folders/0-/0-cd8XI2HU86vol3rXsMTU+++T[27 chars].zip'
- /private/var/folders/0-/0-cd8XI2HU86vol3rXsMTU+++TY/-Tmp-/tmpgs7euvvg/archive.zip
? --------
+ /var/folders/0-/0-cd8XI2HU86vol3rXsMTU+++TY/-Tmp-/tmpgs7euvvg/archive.zip


----------------------------------------------------------------------

This was fixed in bbf72b164720.
History
Date User Action Args
2022-04-11 14:58:20adminsetgithub: 69206
2015-09-08 08:09:50serhiy.storchakasetnosy: + ronaldoussoren, ned.deily
messages: + msg250171
2015-09-07 20:20:55serhiy.storchakasetstatus: open -> closed
resolution: fixed
messages: + msg250127

stage: commit review -> resolved
2015-09-07 17:18:08serhiy.storchakasetassignee: serhiy.storchaka
messages: + msg250120
stage: commit review
2015-09-07 17:00:48python-devsetmessages: + msg250119
2015-09-07 13:28:30zach.waresetnosy: + zach.ware
2015-09-07 11:00:07serhiy.storchakasetmessages: + msg250098
2015-09-07 10:58:41python-devsetnosy: + python-dev
messages: + msg250097
2015-09-07 09:19:17vstinnersetmessages: + msg250091
2015-09-07 09:06:34vstinnersetmessages: + msg250090
title: test_shutil.test_make_archive() fails on Windows -> test_shutil.test_make_archive() fails on Windows 8.1
2015-09-07 09:05:42vstinnercreate