summaryrefslogtreecommitdiff
path: root/setuptools/tests
diff options
context:
space:
mode:
authorAnderson Bravalheri <andersonbravalheri@gmail.com>2023-03-24 17:45:57 +0000
committerAnderson Bravalheri <andersonbravalheri@gmail.com>2023-05-03 14:10:22 +0100
commitb538464546150019fb01d8ed4a194bf4f6e56fcc (patch)
tree68cf0cd7622e280a335698256713a162f0fecf7e /setuptools/tests
parent7d8fba390a72ea98efdfc51c627aa3c96c368678 (diff)
downloadpython-setuptools-git-b538464546150019fb01d8ed4a194bf4f6e56fcc.tar.gz
Mark regular files in wheelbuilder
Diffstat (limited to 'setuptools/tests')
-rw-r--r--setuptools/tests/test_wheelbuilder.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/setuptools/tests/test_wheelbuilder.py b/setuptools/tests/test_wheelbuilder.py
index bfe8f84d..47238061 100644
--- a/setuptools/tests/test_wheelbuilder.py
+++ b/setuptools/tests/test_wheelbuilder.py
@@ -1,6 +1,7 @@
# This test is based on the `test_wheelfile.py` from pypa/wheel,
# which was initially distributed under the MIT License:
# Copyright (c) 2012 Daniel Holth <dholth@fastmail.fm> and contributors
+import stat
import sys
import textwrap
from zipfile import ZipFile, ZIP_DEFLATED
@@ -73,9 +74,8 @@ def test_attributes(tmp_path_factory, tmp_path):
with ZipFile(wheel_path, "r") as zf:
for filename, mode in files:
info = zf.getinfo(filename)
- assert info.external_attr == (mode | 0o100000) << 16
+ assert info.external_attr == (mode | stat.S_IFREG) << 16
assert info.compress_type == ZIP_DEFLATED
info = zf.getinfo("test-1.0.dist-info/RECORD")
- permissions = (info.external_attr >> 16) & 0o777
- assert permissions == 0o664
+ assert info.external_attr == (0o664 | stat.S_IFREG) << 16