Skip to content

Commit dcdfaa1

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

23 files changed

+18
-18
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

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)