Skip to content

Commit 73c37cc

Browse files
authored
Merge branch 'master' into fix-3.11
2 parents a7081ab + 80fb7a5 commit 73c37cc

4 files changed

Lines changed: 22 additions & 11 deletions

File tree

NEWS

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ Improvements
1212
* Add support for Python 3.10.
1313
(Jürgen Gmach)
1414

15+
* Distutils integration is deprecated and will be removed in the next major
16+
version.
17+
1518
2.5.0
1619
~~~~~
1720

@@ -39,7 +42,7 @@ Changes
3942

4043
* The ``safe_hasattr`` utility has been removed from ``testtools.helpers``.
4144
This was a compat wrapper introduced in 0.9.25 when the utility itself was
42-
moved to the ``extras`` package. It is no longer useless on Python 3-only
45+
moved to the ``extras`` package. It is no longer used on Python 3-only
4346
projects.
4447

4548
* The ``try_imports`` utility has been removed from ``testtools.helpers``.

doc/for-test-authors.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,14 @@ From now on, we'll assume that you know how to run your tests.
9292
Running test with Distutils
9393
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
9494

95+
.. deprecated:: 2.6.0
96+
97+
Distutils integration was deprecated in 2.6.0. You should consider
98+
replacing invocations of ``python setup.py test`` with a suitable
99+
alternative such as ``tox``. Refer to `this issue`__ for more information.
100+
101+
.. __: https://github.com/pypa/setuptools/issues/1684
102+
95103
If you are using Distutils_ to build your Python project, you can use the testtools
96104
Distutils_ command to integrate testtools into your Distutils_ workflow::
97105

doc/overview.rst

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -38,14 +38,6 @@ What better way to start than with a contrived code snippet?::
3838
Why use testtools?
3939
==================
4040

41-
Better assertion methods
42-
------------------------
43-
44-
The standard assertion methods that come with unittest aren't as helpful as
45-
they could be, and there aren't quite enough of them. testtools adds
46-
``assertIn``, ``assertIs``, ``assertIsInstance`` and their negatives.
47-
48-
4941
Matchers: better than assertion methods
5042
---------------------------------------
5143

testtools/distutilscmd.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"""Extensions to the standard Python unittest library."""
44

55
import sys
6+
import warnings
67

78
from distutils.core import Command
89
from distutils.errors import DistutilsOptionError
@@ -19,15 +20,22 @@ class TestCommand(Command):
1920
('catch', 'c', "Catch ctrl-C and display results so far"),
2021
('buffer', 'b', "Buffer stdout and stderr during tests"),
2122
('failfast', 'f', "Stop on first fail or error"),
22-
('test-module=','m', "Run 'test_suite' in specified module"),
23-
('test-suite=','s',
23+
('test-module=', 'm', "Run 'test_suite' in specified module"),
24+
('test-suite=', 's',
2425
"Test suite to run (e.g. 'some_module.test_suite')")
2526
]
2627

2728
def __init__(self, dist):
2829
Command.__init__(self, dist)
2930
self.runner = TestToolsTestRunner(stdout=sys.stdout)
3031

32+
warnings.warn(
33+
"Distutils integration is deprecated and will be removed in the "
34+
"next major release. "
35+
"Refer to https://github.com/pypa/setuptools/issues/1684 for more "
36+
"information.",
37+
DeprecationWarning,
38+
)
3139

3240
def initialize_options(self):
3341
self.test_suite = None

0 commit comments

Comments
 (0)