]> granicus.if.org Git - python/commitdiff
Use our existing drop-in, no-op decorator instead of redefining it.
authorÉric Araujo <merwok@netwok.org>
Thu, 11 Aug 2011 22:15:41 +0000 (00:15 +0200)
committerÉric Araujo <merwok@netwok.org>
Thu, 11 Aug 2011 22:15:41 +0000 (00:15 +0200)
Patch by Francisco Martin Brugue.

Lib/packaging/tests/test_pypi_xmlrpc.py

index 682bd7bc7c30c652cabd570f2e184e5bea333077..b7b382dba26d98aa378dd0c4a04fcf9b8ce99b3c 100644 (file)
@@ -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")