Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Update libraries and tests from CPython 3.10.6 #4064

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 23 commits into from
Aug 14, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update stat, statistics from CPython 3.10.6
  • Loading branch information
CPython Developers authored and youknowone committed Aug 14, 2022
commit 3fd08b32ef0fcdba113aaeb9e93c3b35a53251ef
17 changes: 12 additions & 5 deletions 17 Lib/test/test_stat.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@
import os
import socket
import sys
from test.support.socket_helper import skip_unless_bind_unix_socket
from test.support.os_helper import TESTFN
from test.support import os_helper
from test.support import socket_helper
from test.support.import_helper import import_fresh_module
from test.support.os_helper import TESTFN


c_stat = import_fresh_module('stat', fresh=['_stat'])
py_stat = import_fresh_module('stat', blocked=['_stat'])
Expand Down Expand Up @@ -172,11 +174,16 @@ def test_link(self):

@unittest.skipUnless(hasattr(os, 'mkfifo'), 'os.mkfifo not available')
def test_fifo(self):
if sys.platform == "vxworks":
fifo_path = os.path.join("/fifos/", TESTFN)
else:
fifo_path = TESTFN
self.addCleanup(os_helper.unlink, fifo_path)
try:
os.mkfifo(TESTFN, 0o700)
os.mkfifo(fifo_path, 0o700)
except PermissionError as e:
self.skipTest('os.mkfifo(): %s' % e)
st_mode, modestr = self.get_mode()
st_mode, modestr = self.get_mode(fifo_path)
self.assertEqual(modestr, 'prwx------')
self.assertS_IS("FIFO", st_mode)

Expand All @@ -194,7 +201,7 @@ def test_devices(self):
self.assertS_IS("BLK", st_mode)
break

@skip_unless_bind_unix_socket
@socket_helper.skip_unless_bind_unix_socket
def test_socket(self):
with socket.socket(socket.AF_UNIX) as s:
s.bind(TESTFN)
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.