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

Method test_fifo

Lib/test/test_stat.py:194–206  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

192
193 @unittest.skipUnless(hasattr(os, 'mkfifo'), 'os.mkfifo not available')
194 def test_fifo(self):
195 if sys.platform == "vxworks":
196 fifo_path = os.path.join("/fifos/", TESTFN)
197 else:
198 fifo_path = TESTFN
199 self.addCleanup(os_helper.unlink, fifo_path)
200 try:
201 os.mkfifo(fifo_path, 0o700)
202 except PermissionError as e:
203 self.skipTest('os.mkfifo(): %s' % e)
204 st_mode, modestr = self.get_mode(fifo_path)
205 self.assertEqual(modestr, 'prwx------')
206 self.assertS_IS("FIFO", st_mode)
207
208 @unittest.skipUnless(os.name == 'posix', 'requires Posix')
209 def test_devices(self):

Callers

nothing calls this directly

Calls 6

get_modeMethod · 0.95
assertS_ISMethod · 0.95
addCleanupMethod · 0.80
skipTestMethod · 0.80
joinMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected