Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions Lib/test/test_poll.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import time
import unittest
from test.support import (
cpython_only, requires_subprocess, requires_working_socket
cpython_only, requires_subprocess, requires_working_socket, requires_resource
)
from test.support import threading_helper
from test.support.os_helper import TESTFN
Expand Down Expand Up @@ -124,6 +124,7 @@ def fileno(self):
# select(), modified to use poll() instead.

@requires_subprocess()
@requires_resource('walltime')
def test_poll2(self):
cmd = 'for i in 0 1 2 3 4 5 6 7 8 9; do echo testing...; sleep 1; done'
proc = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE,
Expand Down Expand Up @@ -171,7 +172,10 @@ def test_poll3(self):

@cpython_only
def test_poll_c_limits(self):
from _testcapi import USHRT_MAX, INT_MAX, UINT_MAX
try:
from _testcapi import USHRT_MAX, INT_MAX, UINT_MAX
except ImportError:
raise unittest.SkipTest("requires _testcapi")
pollster = select.poll()
pollster.register(1)

Expand All @@ -181,7 +185,7 @@ def test_poll_c_limits(self):
self.assertRaises(OverflowError, pollster.poll, INT_MAX + 1)
self.assertRaises(OverflowError, pollster.poll, UINT_MAX + 1)

@unittest.skip("TODO: RUSTPYTHON fd reallocation")
@unittest.skip("TODO: RUSTPYTHON; fd reallocation")
@threading_helper.reap_threads
def test_threaded_poll(self):
r, w = os.pipe()
Expand All @@ -195,6 +199,7 @@ def test_threaded_poll(self):
pollster = select.poll()
for fd in rfds:
pollster.register(fd, select.POLLIN)

t = threading.Thread(target=pollster.poll)
t.start()
try:
Expand Down
3 changes: 1 addition & 2 deletions Lib/test/test_unpack.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,8 +198,7 @@
__test__ = {'doctests' : doctests}

def load_tests(loader, tests, pattern):
from test.support.rustpython import DocTestChecker # TODO: RUSTPYTHON
tests.addTest(doctest.DocTestSuite(checker=DocTestChecker())) # XXX: RUSTPYTHON
tests.addTest(doctest.DocTestSuite())
return tests


Expand Down
12 changes: 4 additions & 8 deletions Lib/test/test_utf8_mode.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,9 @@
import unittest
from test import support
from test.support.script_helper import assert_python_ok, assert_python_failure
from test.support import os_helper
from test.support import os_helper, MS_WINDOWS


MS_WINDOWS = (sys.platform == 'win32')
POSIX_LOCALES = ('C', 'POSIX')
VXWORKS = (sys.platform == "vxworks")

Expand Down Expand Up @@ -67,8 +66,7 @@ def test_xoption(self):
PYTHONLEGACYWINDOWSFSENCODING='1')
self.assertEqual(out, '0')

# TODO: RUSTPYTHON
@unittest.expectedFailure
@unittest.expectedFailure # TODO: RUSTPYTHON
def test_env_var(self):
code = 'import sys; print(sys.flags.utf8_mode)'

Expand Down Expand Up @@ -125,8 +123,7 @@ def test_filesystemencoding(self):
PYTHONLEGACYWINDOWSFSENCODING='1')
self.assertEqual(out, 'mbcs/replace')

# TODO: RUSTPYTHON
@unittest.expectedFailure
@unittest.expectedFailure # TODO: RUSTPYTHON
def test_stdio(self):
code = textwrap.dedent('''
import sys
Expand Down Expand Up @@ -259,8 +256,7 @@ def test_optim_level(self):
out = self.get_output('-X', 'utf8', '-E', '-c', code)
self.assertEqual(out, '1')

# TODO: RUSTPYTHON
@unittest.expectedFailure
@unittest.expectedFailure # TODO: RUSTPYTHON
@unittest.skipIf(MS_WINDOWS,
"os.device_encoding() doesn't implement "
"the UTF-8 Mode on Windows")
Expand Down
Loading