Skip to content

gh-101334: Don't force USTAR format in test_tarfile. #101572

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Feb 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions Lib/test/test_tarfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,11 @@ def test_add_dir_getmember(self):
self.add_dir_and_getmember('bar')
self.add_dir_and_getmember('a'*101)

@unittest.skipIf(
(hasattr(os, 'getuid') and os.getuid() > 0o777_7777) or
(hasattr(os, 'getgid') and os.getgid() > 0o777_7777),
"uid or gid too high for USTAR format."
)
def add_dir_and_getmember(self, name):
with os_helper.temp_cwd():
with tarfile.open(tmpname, 'w') as tar:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
``test_tarfile`` has been updated to pass when run as a high UID.