Skip to content

Commit 3ccd840

Browse files
committed
Include tests in source distribution but don't install them
1 parent c81f256 commit 3ccd840

24 files changed

+35
-34
lines changed

COPYING

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,6 @@ Code that has been incorporated into Subunit from other projects will
2929
naturally be under its own license, and will retain that license.
3030

3131
A known list of such code is maintained here:
32-
* The runtests.py and python/subunit/tests/TestUtil.py module are GPL test
32+
* The runtests.py and python/tests/TestUtil.py module are GPL test
3333
support modules. They are not installed by Subunit - they are only ever
3434
used on the build machine. Copyright 2004 Canonical Limited.

MANIFEST.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,4 @@ exclude py-compile
1818
prune shell
1919
exclude stamp-h1
2020
include NEWS
21+
recursive-include python/tests *.py

Makefile.am

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -12,23 +12,23 @@ EXTRA_DIST = \
1212
c/check-subunit-0.9.3.patch \
1313
c/check-subunit-0.9.5.patch \
1414
c/check-subunit-0.9.6.patch \
15-
python/subunit/tests/__init__.py \
16-
python/subunit/tests/sample-script.py \
17-
python/subunit/tests/sample-two-script.py \
18-
python/subunit/tests/test_chunked.py \
19-
python/subunit/tests/test_details.py \
20-
python/subunit/tests/test_filters.py \
21-
python/subunit/tests/test_filter_to_disk.py \
22-
python/subunit/tests/test_output_filter.py \
23-
python/subunit/tests/test_progress_model.py \
24-
python/subunit/tests/test_run.py \
25-
python/subunit/tests/test_subunit_filter.py \
26-
python/subunit/tests/test_subunit_stats.py \
27-
python/subunit/tests/test_subunit_tags.py \
28-
python/subunit/tests/test_tap2subunit.py \
29-
python/subunit/tests/test_test_protocol.py \
30-
python/subunit/tests/test_test_protocol2.py \
31-
python/subunit/tests/test_test_results.py \
15+
python/tests/__init__.py \
16+
python/tests/sample-script.py \
17+
python/tests/sample-two-script.py \
18+
python/tests/test_chunked.py \
19+
python/tests/test_details.py \
20+
python/tests/test_filters.py \
21+
python/tests/test_filter_to_disk.py \
22+
python/tests/test_output_filter.py \
23+
python/tests/test_progress_model.py \
24+
python/tests/test_run.py \
25+
python/tests/test_subunit_filter.py \
26+
python/tests/test_subunit_stats.py \
27+
python/tests/test_subunit_tags.py \
28+
python/tests/test_tap2subunit.py \
29+
python/tests/test_test_protocol.py \
30+
python/tests/test_test_protocol2.py \
31+
python/tests/test_test_results.py \
3232
python/subunit/filter_scripts/__init__.py \
3333
python/subunit/filter_scripts/subunit_1to2.py \
3434
python/subunit/filter_scripts/subunit2csv.py \

NEWS

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,14 @@
22
subunit release notes
33
---------------------
44

5+
1.4.6 (UNRELEASED)
6+
---------------------
7+
8+
IMPROVEMENTS
9+
~~~~~~~~~~~~
10+
11+
* Stop installing tests. (Jelmer Vernooij)
12+
513
1.4.5 (2025-11-10)
614
---------------------
715

all_tests.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
import unittest
1818

1919
import subunit
20+
import tests
2021

2122

2223
class ShellTests(subunit.ExecTestCase):
@@ -29,7 +30,7 @@ def test_functions(self):
2930

3031
def test_suite():
3132
result = unittest.TestSuite()
32-
result.addTest(subunit.test_suite())
33+
result.addTest(tests.test_suite())
3334
result.addTest(ShellTests("test_sourcing"))
3435
result.addTest(ShellTests("test_functions"))
3536
return result

pyproject.toml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,6 @@ requires = ["iso8601", "setuptools>=61.2", "testtools"]
55
[tool.ruff]
66
line-length = 120
77

8-
[tool.mypy]
9-
python_version = "3.10"
10-
118
[[tool.mypy.overrides]]
129
module = [
1310
"gi",

python/subunit/__init__.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -175,12 +175,6 @@ def test_script_two(self):
175175
PROGRESS_POP = 3
176176

177177

178-
def test_suite():
179-
import subunit.tests
180-
181-
return subunit.tests.test_suite()
182-
183-
184178
def join_dir(base_path, path):
185179
"""
186180
Returns an absolute path to C{path}, calculated relative to the parent
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
_remote_exception_str_chunked = "57\r\n" + _remote_exception_str + ": boo qux\n0\r\n"
2727

2828

29-
from subunit.tests import ( # noqa: E402
29+
from . import ( # noqa: E402
3030
test_chunked,
3131
test_details,
3232
test_filter_to_disk,
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
msvcrt.setmode(sys.stdout.fileno(), os.O_BINARY)
99
if len(sys.argv) == 2:
10-
# subunit.tests.test_test_protocol.TestExecTestCase.test_sample_method_args
10+
# tests.test_test_protocol.TestExecTestCase.test_sample_method_args
1111
# uses this code path to be sure that the arguments were passed to
1212
# sample-script.py
1313
print("test fail")

0 commit comments

Comments
 (0)