Skip to content

Commit b3ec4bc

Browse files
authored
Merge pull request #361 from jelmer/drop-testcommand
Drop TestCommand
2 parents de46688 + e75ee0f commit b3ec4bc

File tree

7 files changed

+4
-223
lines changed

7 files changed

+4
-223
lines changed

NEWS

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ testtools NEWS
33

44
Changes and improvements to testtools_, grouped by release.
55

6-
2.6.1
6+
2.7.0
77
~~~~~
88

99
Improvements
@@ -15,6 +15,9 @@ Improvements
1515
* Add typing in various modules (still lacking full coverage).
1616
(Jelmer Vernooij)
1717

18+
* Drop the 'test' command for distutils. This has been
19+
deprecated since 2.6.0. (Jelmer Vernooij)
20+
1821
2.6.0
1922
~~~~~
2023

doc/for-test-authors.rst

Lines changed: 0 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -88,43 +88,6 @@ of them will happily run testtools tests. In particular:
8888

8989
From now on, we'll assume that you know how to run your tests.
9090

91-
Running test with Distutils
92-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
93-
94-
.. deprecated:: 2.6.0
95-
96-
Distutils integration was deprecated in 2.6.0. You should consider
97-
replacing invocations of ``python setup.py test`` with a suitable
98-
alternative such as ``tox``. Refer to `this issue`__ for more information.
99-
100-
.. __: https://github.com/pypa/setuptools/issues/1684
101-
102-
If you are using Distutils_ to build your Python project, you can use the testtools
103-
Distutils_ command to integrate testtools into your Distutils_ workflow::
104-
105-
from distutils.core import setup
106-
from testtools import TestCommand
107-
setup(name='foo',
108-
version='1.0',
109-
py_modules=['foo'],
110-
cmdclass={'test': TestCommand}
111-
)
112-
113-
You can then run::
114-
115-
$ python setup.py test -m exampletest
116-
Tests running...
117-
Ran 2 tests in 0.000s
118-
119-
OK
120-
121-
For more information about the capabilities of the `TestCommand` command see::
122-
123-
$ python setup.py test --help
124-
125-
You can use the `setup configuration`_ to specify the default behavior of the
126-
`TestCommand` command.
127-
12891
Assertions
12992
==========
13093

@@ -1469,6 +1432,4 @@ Here, ``repr(nullary)`` will be the same as ``repr(f)``.
14691432
.. _doctest: http://docs.python.org/library/doctest.html
14701433
.. _Deferred: http://twistedmatrix.com/documents/current/core/howto/defer.html
14711434
.. _discover: http://pypi.python.org/pypi/discover
1472-
.. _Distutils: http://docs.python.org/library/distutils.html
1473-
.. _`setup configuration`: http://docs.python.org/distutils/configfile.html
14741435
.. _broken: http://chipaca.com/post/3210673069/hasattr-17-less-harmful

setup.py

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,7 @@
11
#!/usr/bin/env python
22
import setuptools
33

4-
try:
5-
import testtools
6-
cmd_class = {}
7-
if getattr(testtools, 'TestCommand', None) is not None:
8-
cmd_class['test'] = testtools.TestCommand
9-
except:
10-
cmd_class = None
11-
12-
134
setuptools.setup(
145
python_requires='>=3.6',
15-
cmdclass=cmd_class,
166
setup_requires=['pbr'],
177
pbr=True)

testtools/__init__.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
'ResourcedToStreamDecorator',
2222
'Tagger',
2323
'TestCase',
24-
'TestCommand',
2524
'TestByTestResult',
2625
'TestResult',
2726
'TestResultDecorator',
@@ -96,7 +95,6 @@
9695
FixtureSuite,
9796
iterate_tests,
9897
)
99-
from testtools.distutilscmd import TestCommand
10098

10199
# same format as sys.version_info: "A tuple containing the five components of
102100
# the version number: major, minor, micro, releaselevel, and serial. All

testtools/distutilscmd.py

Lines changed: 0 additions & 74 deletions
This file was deleted.

testtools/tests/__init__.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ def test_suite():
1515
test_compat,
1616
test_content,
1717
test_content_type,
18-
test_distutilscmd,
1918
test_fixturesupport,
2019
test_helpers,
2120
test_monkey,
@@ -34,7 +33,6 @@ def test_suite():
3433
test_compat,
3534
test_content,
3635
test_content_type,
37-
test_distutilscmd,
3836
test_fixturesupport,
3937
test_helpers,
4038
test_monkey,

testtools/tests/test_distutilscmd.py

Lines changed: 0 additions & 95 deletions
This file was deleted.

0 commit comments

Comments
 (0)