Skip to content

Commit 6928e67

Browse files
committed
Remove redundant test_attributes_unknown_bits
1 parent 946a09c commit 6928e67

1 file changed

Lines changed: 0 additions & 22 deletions

File tree

‎Lib/test/test_os/test_os.py‎

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -5139,28 +5139,6 @@ def test_attributes(self):
51395139
entry = entries['symlink_file.txt']
51405140
self.check_entry(entry, 'symlink_file.txt', False, True, True)
51415141

5142-
@unittest.skipUnless(sys.platform == 'win32', 'Windows-specific test')
5143-
def test_attributes_unknown_bits(self):
5144-
base = os.stat(self.path)
5145-
file_attributes = base.st_file_attributes
5146-
# Directory flag of DOS file attribute in NTFS
5147-
unknown_attribute = 0x1_000_0000
5148-
self.assertFalse(unknown_attribute & FILE_ATTRIBUTE_MASK)
5149-
5150-
stat1 = os.stat_result(
5151-
tuple(base), {"st_file_attributes": file_attributes})
5152-
stat2 = os.stat_result(
5153-
tuple(base),
5154-
{"st_file_attributes": file_attributes | unknown_attribute})
5155-
self.assert_stat_equal(stat1, stat2, True)
5156-
5157-
stat3 = os.stat_result(
5158-
tuple(base),
5159-
{"st_file_attributes":
5160-
file_attributes ^ stat.FILE_ATTRIBUTE_READONLY})
5161-
with self.assertRaises(AssertionError):
5162-
self.assert_stat_equal(stat1, stat3, True)
5163-
51645142
@unittest.skipIf(sys.platform != 'win32', "Can only test junctions with creation on win32.")
51655143
def test_attributes_junctions(self):
51665144
dirname = os.path.join(self.path, "tgtdir")

0 commit comments

Comments
 (0)