@@ -86,6 +86,8 @@ def test_getresgid(self):
8686 for val in group_ids :
8787 self .assertGreaterEqual (val , 0 )
8888
89+ # TODO: RUSTPYTHON
90+ @unittest .expectedFailure
8991 @unittest .skipUnless (hasattr (posix , 'setresuid' ),
9092 'test needs posix.setresuid()' )
9193 def test_setresuid (self ):
@@ -94,6 +96,8 @@ def test_setresuid(self):
9496 # -1 means don't change that value.
9597 self .assertIsNone (posix .setresuid (- 1 , - 1 , - 1 ))
9698
99+ # TODO: RUSTPYTHON
100+ @unittest .expectedFailure
97101 @unittest .skipUnless (hasattr (posix , 'setresuid' ),
98102 'test needs posix.setresuid()' )
99103 def test_setresuid_exception (self ):
@@ -103,6 +107,8 @@ def test_setresuid_exception(self):
103107 new_user_ids = (current_user_ids [0 ]+ 1 , - 1 , - 1 )
104108 self .assertRaises (OSError , posix .setresuid , * new_user_ids )
105109
110+ # TODO: RUSTPYTHON
111+ @unittest .expectedFailure
106112 @unittest .skipUnless (hasattr (posix , 'setresgid' ),
107113 'test needs posix.setresgid()' )
108114 def test_setresgid (self ):
@@ -111,6 +117,8 @@ def test_setresgid(self):
111117 # -1 means don't change that value.
112118 self .assertIsNone (posix .setresgid (- 1 , - 1 , - 1 ))
113119
120+ # TODO: RUSTPYTHON
121+ @unittest .expectedFailure
114122 @unittest .skipUnless (hasattr (posix , 'setresgid' ),
115123 'test needs posix.setresgid()' )
116124 def test_setresgid_exception (self ):
@@ -602,6 +610,8 @@ def test_osshlock(self):
602610 os .O_RDONLY | os .O_EXLOCK | os .O_NONBLOCK )
603611 os .close (fd )
604612
613+ # TODO: RUSTPYTHON
614+ @unittest .expectedFailure
605615 @unittest .skipUnless (hasattr (posix , 'fstat' ),
606616 'test needs posix.fstat()' )
607617 def test_fstat (self ):
@@ -616,6 +626,8 @@ def test_fstat(self):
616626 finally :
617627 fp .close ()
618628
629+ # TODO: RUSTPYTHON
630+ @unittest .expectedFailure
619631 def test_stat (self ):
620632 self .assertTrue (posix .stat (support .TESTFN ))
621633 self .assertTrue (posix .stat (os .fsencode (support .TESTFN )))
@@ -754,6 +766,8 @@ def check_stat(uid, gid):
754766 self .assertRaises (TypeError , chown_func , first_param , uid , t (gid ))
755767 check_stat (uid , gid )
756768
769+ # TODO: RUSTPYTHON
770+ @unittest .expectedFailure
757771 @unittest .skipUnless (hasattr (posix , 'chown' ), "test needs os.chown()" )
758772 def test_chown (self ):
759773 # raise an OSError if the file does not exist
@@ -764,6 +778,8 @@ def test_chown(self):
764778 support .create_empty_file (support .TESTFN )
765779 self ._test_all_chown_common (posix .chown , support .TESTFN , posix .stat )
766780
781+ # TODO: RUSTPYTHON
782+ @unittest .expectedFailure
767783 @unittest .skipUnless (hasattr (posix , 'fchown' ), "test needs os.fchown()" )
768784 def test_fchown (self ):
769785 os .unlink (support .TESTFN )
@@ -777,6 +793,8 @@ def test_fchown(self):
777793 finally :
778794 test_file .close ()
779795
796+ # TODO: RUSTPYTHON
797+ @unittest .expectedFailure
780798 @unittest .skipUnless (hasattr (posix , 'lchown' ), "test needs os.lchown()" )
781799 def test_lchown (self ):
782800 os .unlink (support .TESTFN )
@@ -793,6 +811,8 @@ def test_chdir(self):
793811 def test_listdir (self ):
794812 self .assertIn (support .TESTFN , posix .listdir (os .curdir ))
795813
814+ # TODO: RUSTPYTHON
815+ @unittest .expectedFailure
796816 def test_listdir_default (self ):
797817 # When listdir is called without argument,
798818 # it's the same as listdir(os.curdir).
@@ -803,6 +823,8 @@ def test_listdir_bytes(self):
803823 # the returned strings are of type bytes.
804824 self .assertIn (os .fsencode (support .TESTFN ), posix .listdir (b'.' ))
805825
826+ # TODO: RUSTPYTHON
827+ @unittest .expectedFailure
806828 def test_listdir_bytes_like (self ):
807829 for cls in bytearray , memoryview :
808830 with self .assertWarns (DeprecationWarning ):
@@ -969,6 +991,7 @@ def test_environ(self):
969991 self .assertEqual (type (k ), item_type )
970992 self .assertEqual (type (v ), item_type )
971993
994+ @unittest .skip ("TODO: RUSTPYTHON" )
972995 def test_putenv (self ):
973996 with self .assertRaises (ValueError ):
974997 os .putenv ('FRUIT\0 VEGETABLE' , 'cabbage' )
@@ -1028,6 +1051,8 @@ def test_getgrouplist(self):
10281051 self .assertIn (group , posix .getgrouplist (user , group ))
10291052
10301053
1054+ # TODO: RUSTPYTHON
1055+ @unittest .expectedFailure
10311056 @unittest .skipUnless (hasattr (os , 'getegid' ), "test needs os.getegid()" )
10321057 def test_getgroups (self ):
10331058 with os .popen ('id -G 2>/dev/null' ) as idg :
@@ -1166,8 +1191,11 @@ def test_mkdir_dir_fd(self):
11661191 posix .close (f )
11671192 support .rmtree (support .TESTFN + 'dir' )
11681193
1169- @unittest .skipUnless ((os .mknod in os .supports_dir_fd ) and hasattr (stat , 'S_IFIFO' ),
1170- "test requires both stat.S_IFIFO and dir_fd support for os.mknod()" )
1194+ # TODO: RUSTPYTHON: AttributeError: module 'os' has no attribute 'mknod'
1195+ #
1196+ # @unittest.skipUnless((os.mknod in os.supports_dir_fd) and hasattr(stat, 'S_IFIFO'),
1197+ # "test requires both stat.S_IFIFO and dir_fd support for os.mknod()")
1198+ @unittest .expectedFailure
11711199 def test_mknod_dir_fd (self ):
11721200 # Test using mknodat() to create a FIFO (the only use specified
11731201 # by POSIX).
@@ -1260,7 +1288,10 @@ def test_unlink_dir_fd(self):
12601288 finally :
12611289 posix .close (f )
12621290
1263- @unittest .skipUnless (os .mkfifo in os .supports_dir_fd , "test needs dir_fd support in os.mkfifo()" )
1291+ # TODO: RUSTPYTHON: AttributeError: module 'os' has no attribute 'mkfifo'
1292+ #
1293+ # @unittest.skipUnless(os.mkfifo in os.supports_dir_fd, "test needs dir_fd support in os.mkfifo()")
1294+ @unittest .expectedFailure
12641295 def test_mkfifo_dir_fd (self ):
12651296 support .unlink (support .TESTFN )
12661297 f = posix .open (posix .getcwd (), posix .O_RDONLY )
@@ -1381,6 +1412,8 @@ def test_sched_setaffinity(self):
13811412 self .assertRaises (OverflowError , posix .sched_setaffinity , 0 , [1 << 128 ])
13821413 self .assertRaises (OSError , posix .sched_setaffinity , - 1 , mask )
13831414
1415+ # TODO: RUSTPYTHON
1416+ @unittest .expectedFailure
13841417 def test_rtld_constants (self ):
13851418 # check presence of major RTLD_* constants
13861419 posix .RTLD_LAZY
@@ -1415,6 +1448,8 @@ def test_fs_holes(self):
14151448 # http://lists.freebsd.org/pipermail/freebsd-amd64/2012-January/014332.html
14161449 raise unittest .SkipTest ("OSError raised!" )
14171450
1451+ # TODO: RUSTPYTHON
1452+ @unittest .expectedFailure
14181453 def test_path_error2 (self ):
14191454 """
14201455 Test functions that call path_error2(), providing two filenames in their exceptions.
@@ -1433,6 +1468,8 @@ def test_path_error2(self):
14331468 else :
14341469 self .fail ("No valid path_error2() test for os." + name )
14351470
1471+ # TODO: RUSTPYTHON
1472+ @unittest .expectedFailure
14361473 def test_path_with_null_character (self ):
14371474 fn = support .TESTFN
14381475 fn_with_NUL = fn + '\0 '
@@ -1451,6 +1488,8 @@ def test_path_with_null_character(self):
14511488 open (fn , 'wb' ).close ()
14521489 self .assertRaises (ValueError , os .stat , fn_with_NUL )
14531490
1491+ # TODO: RUSTPYTHON
1492+ @unittest .expectedFailure
14541493 def test_path_with_null_byte (self ):
14551494 fn = os .fsencode (support .TESTFN )
14561495 fn_with_NUL = fn + b'\0 '
@@ -1529,6 +1568,8 @@ def python_args(self, *args):
15291568 # test_close_file() to fail.
15301569 return (sys .executable , '-I' , '-S' , * args )
15311570
1571+ # TODO: RUSTPYTHON
1572+ @unittest .expectedFailure
15321573 def test_returns_pid (self ):
15331574 pidfile = support .TESTFN
15341575 self .addCleanup (support .unlink , pidfile )
@@ -1543,6 +1584,8 @@ def test_returns_pid(self):
15431584 with open (pidfile ) as f :
15441585 self .assertEqual (f .read (), str (pid ))
15451586
1587+ # TODO: RUSTPYTHON
1588+ @unittest .expectedFailure
15461589 def test_no_such_executable (self ):
15471590 no_such_executable = 'no_such_executable'
15481591 try :
@@ -1558,6 +1601,8 @@ def test_no_such_executable(self):
15581601 self .assertEqual (pid2 , pid )
15591602 self .assertNotEqual (status , 0 )
15601603
1604+ # TODO: RUSTPYTHON
1605+ @unittest .expectedFailure
15611606 def test_specify_environment (self ):
15621607 envfile = support .TESTFN
15631608 self .addCleanup (support .unlink , envfile )
@@ -1573,6 +1618,8 @@ def test_specify_environment(self):
15731618 with open (envfile ) as f :
15741619 self .assertEqual (f .read (), 'bar' )
15751620
1621+ # TODO: RUSTPYTHON
1622+ @unittest .expectedFailure
15761623 def test_none_file_actions (self ):
15771624 pid = self .spawn_func (
15781625 self .NOOP_PROGRAM [0 ],
@@ -1582,6 +1629,8 @@ def test_none_file_actions(self):
15821629 )
15831630 support .wait_process (pid , exitcode = 0 )
15841631
1632+ # TODO: RUSTPYTHON
1633+ @unittest .expectedFailure
15851634 def test_empty_file_actions (self ):
15861635 pid = self .spawn_func (
15871636 self .NOOP_PROGRAM [0 ],
@@ -1591,6 +1640,8 @@ def test_empty_file_actions(self):
15911640 )
15921641 support .wait_process (pid , exitcode = 0 )
15931642
1643+ # TODO: RUSTPYTHON
1644+ @unittest .expectedFailure
15941645 def test_resetids_explicit_default (self ):
15951646 pid = self .spawn_func (
15961647 sys .executable ,
@@ -1600,6 +1651,8 @@ def test_resetids_explicit_default(self):
16001651 )
16011652 support .wait_process (pid , exitcode = 0 )
16021653
1654+ # TODO: RUSTPYTHON
1655+ @unittest .expectedFailure
16031656 def test_resetids (self ):
16041657 pid = self .spawn_func (
16051658 sys .executable ,
@@ -1615,6 +1668,8 @@ def test_resetids_wrong_type(self):
16151668 [sys .executable , "-c" , "pass" ],
16161669 os .environ , resetids = None )
16171670
1671+ # TODO: RUSTPYTHON
1672+ @unittest .expectedFailure
16181673 def test_setpgroup (self ):
16191674 pid = self .spawn_func (
16201675 sys .executable ,
@@ -1645,6 +1700,8 @@ def test_setsigmask(self):
16451700 )
16461701 support .wait_process (pid , exitcode = 0 )
16471702
1703+ # TODO: RUSTPYTHON
1704+ @unittest .expectedFailure
16481705 def test_setsigmask_wrong_type (self ):
16491706 with self .assertRaises (TypeError ):
16501707 self .spawn_func (sys .executable ,
@@ -1660,6 +1717,8 @@ def test_setsigmask_wrong_type(self):
16601717 os .environ , setsigmask = [signal .NSIG ,
16611718 signal .NSIG + 1 ])
16621719
1720+ # TODO: RUSTPYTHON
1721+ @unittest .expectedFailure
16631722 def test_setsid (self ):
16641723 rfd , wfd = os .pipe ()
16651724 self .addCleanup (os .close , rfd )
@@ -1710,6 +1769,8 @@ def test_setsigdef(self):
17101769
17111770 support .wait_process (pid , exitcode = - signal .SIGUSR1 )
17121771
1772+ # TODO: RUSTPYTHON
1773+ @unittest .expectedFailure
17131774 def test_setsigdef_wrong_type (self ):
17141775 with self .assertRaises (TypeError ):
17151776 self .spawn_func (sys .executable ,
@@ -1764,6 +1825,8 @@ def test_setscheduler_with_policy(self):
17641825 )
17651826 support .wait_process (pid , exitcode = 0 )
17661827
1828+ # TODO: RUSTPYTHON
1829+ @unittest .expectedFailure
17671830 def test_multiple_file_actions (self ):
17681831 file_actions = [
17691832 (os .POSIX_SPAWN_OPEN , 3 , os .path .realpath (__file__ ), os .O_RDONLY , 0 ),
@@ -1805,6 +1868,8 @@ def test_bad_file_actions(self):
18051868 3 , __file__ + '\0 ' ,
18061869 os .O_RDONLY , 0 )])
18071870
1871+ # TODO: RUSTPYTHON
1872+ @unittest .expectedFailure
18081873 def test_open_file (self ):
18091874 outfile = support .TESTFN
18101875 self .addCleanup (support .unlink , outfile )
@@ -1825,6 +1890,8 @@ def test_open_file(self):
18251890 with open (outfile ) as f :
18261891 self .assertEqual (f .read (), 'hello' )
18271892
1893+ # TODO: RUSTPYTHON
1894+ @unittest .expectedFailure
18281895 def test_close_file (self ):
18291896 closefile = support .TESTFN
18301897 self .addCleanup (support .unlink , closefile )
@@ -1844,6 +1911,8 @@ def test_close_file(self):
18441911 with open (closefile ) as f :
18451912 self .assertEqual (f .read (), 'is closed %d' % errno .EBADF )
18461913
1914+ # TODO: RUSTPYTHON
1915+ @unittest .expectedFailure
18471916 def test_dup2 (self ):
18481917 dupfile = support .TESTFN
18491918 self .addCleanup (support .unlink , dupfile )
@@ -1872,6 +1941,8 @@ class TestPosixSpawn(unittest.TestCase, _PosixSpawnMixin):
18721941class TestPosixSpawnP (unittest .TestCase , _PosixSpawnMixin ):
18731942 spawn_func = getattr (posix , 'posix_spawnp' , None )
18741943
1944+ # TODO: RUSTPYTHON
1945+ @unittest .expectedFailure
18751946 @support .skip_unless_symlink
18761947 def test_posix_spawnp (self ):
18771948 # Use a symlink to create a program in its own temporary directory
0 commit comments