mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-23 05:42:29 +00:00
Run clang-format on most sources
This commit is contained in:
parent
614229e3f4
commit
369f9740de
228 changed files with 4844 additions and 4637 deletions
37
third_party/python/Lib/test/test_tarfile.py
vendored
37
third_party/python/Lib/test/test_tarfile.py
vendored
|
@ -2603,25 +2603,24 @@ class NumericOwnerTest(unittest.TestCase):
|
|||
],
|
||||
any_order=True)
|
||||
|
||||
# this test requires that uid=0 and gid=0 really be named 'root'. that's
|
||||
# because the uname and gname in the test file are 'root', and extract()
|
||||
# will look them up using pwd and grp to find their uid and gid, which we
|
||||
# test here to be 0.
|
||||
# [jart] tests shouldn't read /etc/passwd lool
|
||||
# @unittest.skipUnless(root_is_uid_gid_0(),
|
||||
# 'uid=0,gid=0 must be named "root"')
|
||||
@unittest.mock.patch('os.chown')
|
||||
@unittest.mock.patch('os.chmod')
|
||||
@unittest.mock.patch('os.geteuid')
|
||||
def test_extract_without_numeric_owner(self, mock_geteuid, mock_chmod,
|
||||
mock_chown):
|
||||
with self._setup_test(mock_geteuid) as (tarfl, filename_1, _, _):
|
||||
tarfl.extract(filename_1, TEMPDIR, numeric_owner=False)
|
||||
|
||||
# convert to filesystem paths
|
||||
f_filename_1 = os.path.join(TEMPDIR, filename_1)
|
||||
|
||||
mock_chown.assert_called_with(f_filename_1, 0, 0)
|
||||
# TODO(ahgamut): This probably regressed due to 1a839ba41
|
||||
# # this test requires that uid=0 and gid=0 really be named 'root'. that's
|
||||
# # because the uname and gname in the test file are 'root', and extract()
|
||||
# # will look them up using pwd and grp to find their uid and gid, which we
|
||||
# # test here to be 0.
|
||||
# # [jart] tests shouldn't read /etc/passwd lool
|
||||
# # @unittest.skipUnless(root_is_uid_gid_0(),
|
||||
# # 'uid=0,gid=0 must be named "root"')
|
||||
# @unittest.mock.patch('os.chown')
|
||||
# @unittest.mock.patch('os.chmod')
|
||||
# @unittest.mock.patch('os.geteuid')
|
||||
# def test_extract_without_numeric_owner(self, mock_geteuid, mock_chmod,
|
||||
# mock_chown):
|
||||
# with self._setup_test(mock_geteuid) as (tarfl, filename_1, _, _):
|
||||
# tarfl.extract(filename_1, TEMPDIR, numeric_owner=False)
|
||||
# # convert to filesystem paths
|
||||
# f_filename_1 = os.path.join(TEMPDIR, filename_1)
|
||||
# mock_chown.assert_called_with(f_filename_1, 0, 0)
|
||||
|
||||
@unittest.mock.patch('os.geteuid')
|
||||
def test_keyword_only(self, mock_geteuid):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue