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

Commit 8b09202

Browse filesBrowse files
committed
posix.pathconf_names only for linux
1 parent 468f1aa commit 8b09202
Copy full SHA for 8b09202

File tree

2 files changed

+3
-2
lines changed
Filter options

2 files changed

+3
-2
lines changed

‎extra_tests/snippets/stdlib_os.py

Copy file name to clipboardExpand all lines: extra_tests/snippets/stdlib_os.py
+1-2Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -509,9 +509,8 @@ def __exit__(self, exc_type, exc_val, exc_tb):
509509
assert_raises(TypeError, os.system, arg)
510510

511511
# Testing for os.pathconf_names
512-
if not sys.platform.startswith("win"):
512+
if sys.platform.startswith('linux'):
513513
assert len(os.pathconf_names) > 0
514514
assert 'PC_NAME_MAX' in os.pathconf_names
515515
for option,index in os.pathconf_names.items():
516516
assert os.pathconf('/', index) == os.pathconf('/', option)
517-

‎vm/src/stdlib/posix.rs

Copy file name to clipboardExpand all lines: vm/src/stdlib/posix.rs
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1883,6 +1883,8 @@ pub mod module {
18831883
pathconf(PathOrFd::Fd(fd), name, vm)
18841884
}
18851885

1886+
// TODO: this is expected to be run on macOS as a unix, but somehow not.
1887+
#[cfg(target_os = "linux")]
18861888
#[pyattr]
18871889
fn pathconf_names(vm: &VirtualMachine) -> PyDictRef {
18881890
let pathname = vm.ctx.new_dict();

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.