MCPcopy Index your code
hub / github.com/python/cpython / test_non_matching_mode

Method test_non_matching_mode

Lib/test/test_shutil.py:2426–2432  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

2424
2425 @os_helper.skip_if_dac_override
2426 def test_non_matching_mode(self):
2427 # Set the file read-only and ask for writeable files.
2428 os.chmod(self.filepath, stat.S_IREAD)
2429 if os.access(self.filepath, os.W_OK):
2430 self.skipTest("can't set the file read-only")
2431 rv = shutil.which(self.file, path=self.dir, mode=os.W_OK)
2432 self.assertIsNone(rv)
2433
2434 def test_relative_path(self):
2435 base_dir, tail_dir = os.path.split(self.dir)

Callers

nothing calls this directly

Calls 4

accessMethod · 0.80
skipTestMethod · 0.80
assertIsNoneMethod · 0.80
chmodMethod · 0.45

Tested by

no test coverage detected