Skip to content

Commit e91a9b7

Browse files
committed
save
1 parent 50af1ad commit e91a9b7

File tree

1 file changed

+27
-6
lines changed

1 file changed

+27
-6
lines changed

Lib/test/test_os.py

Lines changed: 27 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -935,6 +935,8 @@ def set_time(filename):
935935
os.utime(self.fname, None)
936936
self._test_utime_current(set_time)
937937

938+
# TODO: RUSTPYTHON
939+
@unittest.expectedFailure
938940
def test_utime_nonexistent(self):
939941
now = time.time()
940942
filename = 'nonexistent'
@@ -1761,11 +1763,6 @@ def test_dir_fd(self):
17611763
def test_yields_correct_dir_fd(self):
17621764
return super().test_yields_correct_dir_fd()
17631765

1764-
# TODO: RUSTPYTHON (TypeError: Can't mix strings and bytes in path components)
1765-
@unittest.expectedFailure
1766-
def test_walk_bottom_up(self):
1767-
return super().test_walk_bottom_up()
1768-
17691766
@unittest.skipUnless(hasattr(os, 'fwalk'), "Test needs os.fwalk()")
17701767
class BytesFwalkTests(FwalkTests):
17711768
"""Tests for os.walk() with bytes."""
@@ -2450,6 +2447,8 @@ def test_fchmod(self):
24502447
def test_fchown(self):
24512448
self.check(os.fchown, -1, -1)
24522449

2450+
# TODO: RUSTPYTHON
2451+
@unittest.expectedFailure
24532452
@unittest.skipUnless(hasattr(os, 'fpathconf'), 'test needs os.fpathconf()')
24542453
@unittest.skipIf(
24552454
support.is_emscripten or support.is_wasi,
@@ -2514,6 +2513,11 @@ def test_blocking(self):
25142513
self.check(os.get_blocking)
25152514
self.check(os.set_blocking, True)
25162515

2516+
# TODO: RUSTPYTHON
2517+
@unittest.expectedFailure
2518+
def test_fchdir(self):
2519+
return super().test_fchdir()
2520+
25172521

25182522
@unittest.skipUnless(hasattr(os, 'link'), 'requires os.link')
25192523
class LinkTests(unittest.TestCase):
@@ -2559,34 +2563,44 @@ class PosixUidGidTests(unittest.TestCase):
25592563
UID_OVERFLOW = (1 << 32)
25602564
GID_OVERFLOW = (1 << 32)
25612565

2566+
# TODO:RUSTPYTHON
2567+
@unittest.skip("TODO: RUSTPYTHON; crash")
25622568
@unittest.skipUnless(hasattr(os, 'setuid'), 'test needs os.setuid()')
25632569
def test_setuid(self):
25642570
if os.getuid() != 0:
25652571
self.assertRaises(OSError, os.setuid, 0)
25662572
self.assertRaises(TypeError, os.setuid, 'not an int')
25672573
self.assertRaises(OverflowError, os.setuid, self.UID_OVERFLOW)
25682574

2575+
# TODO:RUSTPYTHON
2576+
@unittest.skip("TODO: RUSTPYTHON; crash")
25692577
@unittest.skipUnless(hasattr(os, 'setgid'), 'test needs os.setgid()')
25702578
def test_setgid(self):
25712579
if os.getuid() != 0 and not HAVE_WHEEL_GROUP:
25722580
self.assertRaises(OSError, os.setgid, 0)
25732581
self.assertRaises(TypeError, os.setgid, 'not an int')
25742582
self.assertRaises(OverflowError, os.setgid, self.GID_OVERFLOW)
25752583

2584+
# TODO:RUSTPYTHON
2585+
@unittest.skip("TODO: RUSTPYTHON; crash")
25762586
@unittest.skipUnless(hasattr(os, 'seteuid'), 'test needs os.seteuid()')
25772587
def test_seteuid(self):
25782588
if os.getuid() != 0:
25792589
self.assertRaises(OSError, os.seteuid, 0)
25802590
self.assertRaises(TypeError, os.setegid, 'not an int')
25812591
self.assertRaises(OverflowError, os.seteuid, self.UID_OVERFLOW)
25822592

2593+
# TODO:RUSTPYTHON
2594+
@unittest.skip("TODO: RUSTPYTHON; crash")
25832595
@unittest.skipUnless(hasattr(os, 'setegid'), 'test needs os.setegid()')
25842596
def test_setegid(self):
25852597
if os.getuid() != 0 and not HAVE_WHEEL_GROUP:
25862598
self.assertRaises(OSError, os.setegid, 0)
25872599
self.assertRaises(TypeError, os.setegid, 'not an int')
25882600
self.assertRaises(OverflowError, os.setegid, self.GID_OVERFLOW)
25892601

2602+
# TODO:RUSTPYTHON
2603+
@unittest.skip("TODO: RUSTPYTHON; crash")
25902604
@unittest.skipUnless(hasattr(os, 'setreuid'), 'test needs os.setreuid()')
25912605
def test_setreuid(self):
25922606
if os.getuid() != 0:
@@ -4215,7 +4229,10 @@ def test_eventfd_select(self):
42154229
class TimerfdTests(unittest.TestCase):
42164230
# 1 ms accuracy is reliably achievable on every platform except Android
42174231
# emulators, where we allow 10 ms (gh-108277).
4218-
if sys.platform == "android" and platform.android_ver().is_emulator:
4232+
4233+
# XXX: RUSTPYTHON; AttributeError: module 'platform' has no attribute 'android_ver'
4234+
#if sys.platform == "android" and platform.android_ver().is_emulator:
4235+
if sys.platform == "android":
42194236
CLOCK_RES_PLACES = 2
42204237
else:
42214238
CLOCK_RES_PLACES = 3
@@ -5420,13 +5437,17 @@ class A(os.PathLike):
54205437
def test_pathlike_class_getitem(self):
54215438
self.assertIsInstance(os.PathLike[bytes], types.GenericAlias)
54225439

5440+
# TODO: RUSTPYTHON
5441+
@unittest.expectedFailure
54235442
def test_pathlike_subclass_slots(self):
54245443
class A(os.PathLike):
54255444
__slots__ = ()
54265445
def __fspath__(self):
54275446
return ''
54285447
self.assertFalse(hasattr(A(), '__dict__'))
54295448

5449+
# TODO: RUSTPYTHON
5450+
@unittest.expectedFailure
54305451
def test_fspath_set_to_None(self):
54315452
class Foo:
54325453
__fspath__ = None

0 commit comments

Comments
 (0)