Avoids:

SetuptoolsDeprecationWarning: The test command is disabled and references to it are deprecated.

https://github.com/pypa/setuptools/issues/4520
https://github.com/pypa/setuptools/commit/c437aaa8d5b969a9fe8c8147463bfcb85b31ab26

diff --git setup.py setup.py
index 069514f4a2b6..dd1ee27b98d0 100644
--- setup.py
+++ setup.py
@@ -4,7 +4,6 @@ import os
 
 import setuptools
 from setuptools import setup, find_packages
-from setuptools.command.test import test as TestCommand
 
 from distutils.version import LooseVersion
 import warnings
@@ -20,13 +19,6 @@ if LooseVersion(setuptools.__version__) <= LooseVersion("24.3"):
                   UserWarning)
 
 
-class Unsupported(TestCommand):
-    def run(self):
-        sys.stderr.write("Running 'test' with setup.py is not supported. "
-                         "Use 'pytest' or 'tox' to run the tests.\n")
-        sys.exit(1)
-
-
 ###
 # Load metadata
 
@@ -51,8 +43,5 @@ setup(
           'write_to': 'src/dateutil/_version.py',
       },
       ## Needed since doctest not supported by PyPA.
-      long_description = README,
-      cmdclass={
-          "test": Unsupported
-      }
+      long_description = README
       )
