mirror of
https://github.com/python/cpython.git
synced 2025-08-03 08:34:29 +00:00
Issue #12115: skipping all tests that need threading under a threadless environment
This commit is contained in:
parent
cfd365b937
commit
fd88318ac4
4 changed files with 35 additions and 4 deletions
|
@ -5,10 +5,18 @@ import urllib.request
|
|||
import urllib.parse
|
||||
import urllib.error
|
||||
|
||||
from packaging.tests.pypi_server import PyPIServer, PYPI_DEFAULT_STATIC_PATH
|
||||
try:
|
||||
import threading
|
||||
from packaging.tests.pypi_server import PyPIServer, PYPI_DEFAULT_STATIC_PATH
|
||||
except ImportError:
|
||||
threading = None
|
||||
PyPIServer = None
|
||||
PYPI_DEFAULT_STATIC_PATH = None
|
||||
|
||||
from packaging.tests import unittest
|
||||
|
||||
|
||||
@unittest.skipIf(threading is None, "Needs threading")
|
||||
class PyPIServerTest(unittest.TestCase):
|
||||
|
||||
def test_records_requests(self):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue