mirror of
https://github.com/RustPython/RustPython.git
synced 2026-10-28 18:59:04 +08:00
Fix thread tests a bit
This commit is contained in:
2 files changed
+8
-6
No files matched your search
@@ -3,11 +3,11 @@
|
||||
if __name__ != 'test.support':
|
||||
raise ImportError('support must be imported from the test package')
|
||||
|
||||
# import asyncio.events
|
||||
import asyncio.events
|
||||
import collections.abc
|
||||
import contextlib
|
||||
import errno
|
||||
# import faulthandler
|
||||
import faulthandler
|
||||
import fnmatch
|
||||
import functools
|
||||
# import gc
|
||||
@@ -16,7 +16,7 @@ import hashlib
|
||||
import importlib
|
||||
import importlib.util
|
||||
import locale
|
||||
# import logging.handlers
|
||||
import logging.handlers
|
||||
# import nntplib
|
||||
import os
|
||||
import platform
|
||||
@@ -28,13 +28,13 @@ import struct
|
||||
import subprocess
|
||||
import sys
|
||||
import sysconfig
|
||||
# import tempfile
|
||||
import tempfile
|
||||
import _thread
|
||||
# import threading
|
||||
import threading
|
||||
import time
|
||||
import types
|
||||
import unittest
|
||||
# import urllib.error
|
||||
import urllib.error
|
||||
import warnings
|
||||
|
||||
from .testresult import get_test_runner
|
||||
|
||||
@@ -104,6 +104,7 @@ class ThreadRunningTests(BasicThreadTest):
|
||||
|
||||
thread.stack_size(0)
|
||||
|
||||
@unittest.skip("TODO: RUSTPYTHON, weakref destructors")
|
||||
def test__count(self):
|
||||
# Test the _count() function.
|
||||
orig = thread._count()
|
||||
@@ -133,6 +134,7 @@ class ThreadRunningTests(BasicThreadTest):
|
||||
time.sleep(POLL_SLEEP)
|
||||
self.assertEqual(thread._count(), orig)
|
||||
|
||||
@unittest.skip("TODO: RUSTPYTHON, sys.unraisablehook")
|
||||
def test_unraisable_exception(self):
|
||||
def task():
|
||||
started.release()
|
||||
|
||||
Reference in new issue
Block a user