cpython/Lib/test/test_distutils.py
Victor Stinner 69ca32e0d3
bpo-41282: Fix distutils.utils.byte_compile() DeprecationWarning (GH-25406)
* byte_compile() of distutils.utils no longer logs a
  DeprecationWarning
* test_distutils no longer logs a DeprecationWarning
2021-04-16 11:26:40 +02:00

30 lines
644 B
Python

"""Tests for distutils.
The tests for distutils are defined in the distutils.tests package;
the test_suite() function there returns a test suite that's ready to
be run.
"""
import warnings
from test import support
from test.support import warnings_helper
with warnings_helper.check_warnings(
("The distutils package is deprecated", DeprecationWarning)):
import distutils.tests
def test_main():
# used by regrtest
support.run_unittest(distutils.tests.test_suite())
support.reap_children()
def load_tests(*_):
# used by unittest
return distutils.tests.test_suite()
if __name__ == "__main__":
test_main()