Kaydet (Commit) 4460abea authored tarafından Éric Araujo's avatar Éric Araujo

Use our existing drop-in, no-op decorator instead of redefining it.

Patch by Francisco Martin Brugue.
üst 54dbfbd6
...@@ -3,18 +3,14 @@ ...@@ -3,18 +3,14 @@
from packaging.pypi.xmlrpc import Client, InvalidSearchField, ProjectNotFound from packaging.pypi.xmlrpc import Client, InvalidSearchField, ProjectNotFound
from packaging.tests import unittest from packaging.tests import unittest
from packaging.tests.support import fake_dec
try: try:
import threading import threading
from packaging.tests.pypi_server import use_xmlrpc_server from packaging.tests.pypi_server import use_xmlrpc_server
except ImportError: except ImportError:
threading = None threading = None
def use_xmlrpc_server(): use_xmlrpc_server = fake_dec
def _use(func):
def __use(*args, **kw):
return func(*args, **kw)
return __use
return _use
@unittest.skipIf(threading is None, "Needs threading") @unittest.skipIf(threading is None, "Needs threading")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment