File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -484,8 +484,6 @@ def g456():
484
484
leave_g .set ()
485
485
t .join ()
486
486
487
- # TODO: RUSTPYTHON, AttributeError: module 'sys' has no attribute 'orig_argv'
488
- @unittest .expectedFailure
489
487
def test_attributes (self ):
490
488
self .assertIsInstance (sys .api_version , int )
491
489
self .assertIsInstance (sys .argv , list )
@@ -1006,8 +1004,6 @@ def test__enablelegacywindowsfsencoding(self):
1006
1004
out = out .decode ('ascii' , 'replace' ).rstrip ()
1007
1005
self .assertEqual (out , 'mbcs replace' )
1008
1006
1009
- # TODO: RUSTPYTHON, subprocess.CalledProcessError: Command ... returned non-zero exit status 1.
1010
- @unittest .expectedFailure
1011
1007
def test_orig_argv (self ):
1012
1008
code = textwrap .dedent ('''
1013
1009
import sys
Original file line number Diff line number Diff line change @@ -217,6 +217,11 @@ mod sys {
217
217
Vec :: new ( )
218
218
}
219
219
220
+ #[ pyattr]
221
+ fn orig_argv ( vm : & VirtualMachine ) -> Vec < PyObjectRef > {
222
+ env:: args ( ) . map ( |arg| vm. ctx . new_str ( arg) . into ( ) ) . collect ( )
223
+ }
224
+
220
225
#[ pyattr]
221
226
fn path ( vm : & VirtualMachine ) -> Vec < PyObjectRef > {
222
227
vm. state
You can’t perform that action at this time.
0 commit comments