File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -484,8 +484,6 @@ def g456():
484484 leave_g .set ()
485485 t .join ()
486486
487- # TODO: RUSTPYTHON, AttributeError: module 'sys' has no attribute 'orig_argv'
488- @unittest .expectedFailure
489487 def test_attributes (self ):
490488 self .assertIsInstance (sys .api_version , int )
491489 self .assertIsInstance (sys .argv , list )
@@ -1006,8 +1004,6 @@ def test__enablelegacywindowsfsencoding(self):
10061004 out = out .decode ('ascii' , 'replace' ).rstrip ()
10071005 self .assertEqual (out , 'mbcs replace' )
10081006
1009- # TODO: RUSTPYTHON, subprocess.CalledProcessError: Command ... returned non-zero exit status 1.
1010- @unittest .expectedFailure
10111007 def test_orig_argv (self ):
10121008 code = textwrap .dedent ('''
10131009 import sys
Original file line number Diff line number Diff line change @@ -217,6 +217,11 @@ mod sys {
217217 Vec :: new ( )
218218 }
219219
220+ #[ pyattr]
221+ fn orig_argv ( vm : & VirtualMachine ) -> Vec < PyObjectRef > {
222+ env:: args ( ) . map ( |arg| vm. ctx . new_str ( arg) . into ( ) ) . collect ( )
223+ }
224+
220225 #[ pyattr]
221226 fn path ( vm : & VirtualMachine ) -> Vec < PyObjectRef > {
222227 vm. state
You can’t perform that action at this time.
0 commit comments