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")