From 4460abea64b0f2b59d311871eca24f8a09b3cee5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Araujo?= Date: Fri, 12 Aug 2011 00:15:41 +0200 Subject: [PATCH] Use our existing drop-in, no-op decorator instead of redefining it. Patch by Francisco Martin Brugue. --- Lib/packaging/tests/test_pypi_xmlrpc.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/Lib/packaging/tests/test_pypi_xmlrpc.py b/Lib/packaging/tests/test_pypi_xmlrpc.py index 682bd7bc7c3..b7b382dba26 100644 --- a/Lib/packaging/tests/test_pypi_xmlrpc.py +++ b/Lib/packaging/tests/test_pypi_xmlrpc.py @@ -3,18 +3,14 @@ from packaging.pypi.xmlrpc import Client, InvalidSearchField, ProjectNotFound from packaging.tests import unittest +from packaging.tests.support import fake_dec try: import threading from packaging.tests.pypi_server import use_xmlrpc_server except ImportError: threading = None - def use_xmlrpc_server(): - def _use(func): - def __use(*args, **kw): - return func(*args, **kw) - return __use - return _use + use_xmlrpc_server = fake_dec @unittest.skipIf(threading is None, "Needs threading")