mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-23 13:52:28 +00:00
Test changes to Actually Portable Python (#240)
- Add missing `os.pipe` and `os.getuid` - Commented out _dummy_thread from Lib/threading.py so tests don't simulate multi-threading and waste time/error out - Revert test_hashlib to avoid blake2
This commit is contained in:
parent
a22f0736d8
commit
1aa0df696c
5 changed files with 20 additions and 3 deletions
|
@ -10,7 +10,6 @@ import py_compile
|
|||
import random
|
||||
import stat
|
||||
import sys
|
||||
import threading
|
||||
import time
|
||||
import unittest
|
||||
import unittest.mock as mock
|
||||
|
@ -28,6 +27,10 @@ from test.support import (
|
|||
from test.support import script_helper
|
||||
from test.test_importlib.util import uncache
|
||||
|
||||
try:
|
||||
import threading
|
||||
except ImportError as e:
|
||||
threading = None
|
||||
|
||||
skip_if_dont_write_bytecode = unittest.skipIf(
|
||||
sys.dont_write_bytecode,
|
||||
|
@ -365,6 +368,7 @@ class ImportTests(unittest.TestCase):
|
|||
with self.assertRaises(AttributeError):
|
||||
os.does_not_exist
|
||||
|
||||
@unittest.skipUnless(threading != None, "concurrency requires threading")
|
||||
def test_concurrency(self):
|
||||
sys.path.insert(0, os.path.join(os.path.dirname(__file__), 'data'))
|
||||
try:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue