File tree Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -159,8 +159,6 @@ def test_access(self):
159
159
os .close (f )
160
160
self .assertTrue (os .access (support .TESTFN , os .W_OK ))
161
161
162
- # TODO: RUSTPYTHON (AttributeError: module 'os' has no attribute 'dup')
163
- @unittest .expectedFailure
164
162
def test_closerange (self ):
165
163
first = os .open (support .TESTFN , os .O_CREAT | os .O_RDWR )
166
164
# We must allocate two consecutive file descriptors, otherwise
@@ -1625,8 +1623,6 @@ def test_urandom_failure(self):
1625
1623
"""
1626
1624
assert_python_ok ('-c' , code )
1627
1625
1628
- # TODO: RUSTPYTHON
1629
- @unittest .expectedFailure
1630
1626
def test_urandom_fd_closed (self ):
1631
1627
# Issue #21207: urandom() should reopen its fd to /dev/urandom if
1632
1628
# closed.
@@ -1641,8 +1637,6 @@ def test_urandom_fd_closed(self):
1641
1637
"""
1642
1638
rc , out , err = assert_python_ok ('-Sc' , code )
1643
1639
1644
- # TODO: RUSTPYTHON
1645
- @unittest .expectedFailure
1646
1640
def test_urandom_fd_reopened (self ):
1647
1641
# Issue #21207: urandom() should detect its fd to /dev/urandom
1648
1642
# changed to something else, and reopen it.
Original file line number Diff line number Diff line change @@ -332,6 +332,13 @@ mod _os {
332
332
rust_file ( fileno) ;
333
333
}
334
334
335
+ #[ pyfunction]
336
+ fn closerange ( fd_low : i64 , fd_high : i64 ) {
337
+ for fileno in fd_low..fd_high {
338
+ close ( fileno) ;
339
+ }
340
+ }
341
+
335
342
#[ cfg( any( unix, windows, target_os = "wasi" ) ) ]
336
343
#[ pyfunction]
337
344
pub ( crate ) fn open (
You can’t perform that action at this time.
0 commit comments