testtools 2.9.0__tar.gz → 2.9.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (110) hide show
  1. {testtools-2.9.0 → testtools-2.9.2}/.github/workflows/publish.yml +2 -2
  2. {testtools-2.9.0 → testtools-2.9.2}/.github/workflows/test.yml +10 -10
  3. {testtools-2.9.0 → testtools-2.9.2}/NEWS +20 -0
  4. {testtools-2.9.0 → testtools-2.9.2}/PKG-INFO +4 -3
  5. {testtools-2.9.0 → testtools-2.9.2}/doc/for-framework-folk.rst +1 -1
  6. {testtools-2.9.0 → testtools-2.9.2}/pyproject.toml +2 -2
  7. testtools-2.9.2/requirements.txt +1 -0
  8. {testtools-2.9.0 → testtools-2.9.2}/tests/test_fixturesupport.py +17 -13
  9. {testtools-2.9.0 → testtools-2.9.2}/tests/test_run.py +56 -77
  10. {testtools-2.9.0 → testtools-2.9.2}/tests/test_testcase.py +377 -28
  11. {testtools-2.9.0 → testtools-2.9.2}/tests/test_testresult.py +57 -25
  12. {testtools-2.9.0 → testtools-2.9.2}/tests/test_testsuite.py +5 -13
  13. {testtools-2.9.0 → testtools-2.9.2}/testtools/_types.py +1 -1
  14. {testtools-2.9.0 → testtools-2.9.2}/testtools/_version.py +2 -2
  15. {testtools-2.9.0 → testtools-2.9.2}/testtools/runtest.py +10 -3
  16. {testtools-2.9.0 → testtools-2.9.2}/testtools/testcase.py +187 -14
  17. {testtools-2.9.0 → testtools-2.9.2}/testtools/testresult/doubles.py +47 -23
  18. {testtools-2.9.0 → testtools-2.9.2}/testtools/testresult/real.py +34 -15
  19. {testtools-2.9.0 → testtools-2.9.2}/testtools/twistedsupport/_runtest.py +4 -1
  20. testtools-2.9.0/requirements.txt +0 -1
  21. {testtools-2.9.0 → testtools-2.9.2}/.git-blame-ignore-revs +0 -0
  22. {testtools-2.9.0 → testtools-2.9.2}/.github/dependabot.yaml +0 -0
  23. {testtools-2.9.0 → testtools-2.9.2}/.gitignore +0 -0
  24. {testtools-2.9.0 → testtools-2.9.2}/.gitreview +0 -0
  25. {testtools-2.9.0 → testtools-2.9.2}/.testr.conf +0 -0
  26. {testtools-2.9.0 → testtools-2.9.2}/LICENSE +0 -0
  27. {testtools-2.9.0 → testtools-2.9.2}/MANIFEST.in +0 -0
  28. {testtools-2.9.0 → testtools-2.9.2}/Makefile +0 -0
  29. {testtools-2.9.0 → testtools-2.9.2}/README.rst +0 -0
  30. {testtools-2.9.0 → testtools-2.9.2}/disperse.conf +0 -0
  31. {testtools-2.9.0 → testtools-2.9.2}/doc/Makefile +0 -0
  32. {testtools-2.9.0 → testtools-2.9.2}/doc/_static/placeholder.txt +0 -0
  33. {testtools-2.9.0 → testtools-2.9.2}/doc/_templates/placeholder.txt +0 -0
  34. {testtools-2.9.0 → testtools-2.9.2}/doc/api.rst +0 -0
  35. {testtools-2.9.0 → testtools-2.9.2}/doc/conf.py +0 -0
  36. {testtools-2.9.0 → testtools-2.9.2}/doc/for-test-authors.rst +0 -0
  37. {testtools-2.9.0 → testtools-2.9.2}/doc/hacking.rst +0 -0
  38. {testtools-2.9.0 → testtools-2.9.2}/doc/index.rst +0 -0
  39. {testtools-2.9.0 → testtools-2.9.2}/doc/make.bat +0 -0
  40. {testtools-2.9.0 → testtools-2.9.2}/doc/news.rst +0 -0
  41. {testtools-2.9.0 → testtools-2.9.2}/doc/overview.rst +0 -0
  42. {testtools-2.9.0 → testtools-2.9.2}/doc/twisted-support.rst +0 -0
  43. {testtools-2.9.0 → testtools-2.9.2}/readthedocs-requirements.txt +0 -0
  44. {testtools-2.9.0 → testtools-2.9.2}/scripts/README +0 -0
  45. {testtools-2.9.0 → testtools-2.9.2}/scripts/all-pythons +0 -0
  46. {testtools-2.9.0 → testtools-2.9.2}/scripts/update-rtfd +0 -0
  47. {testtools-2.9.0 → testtools-2.9.2}/tests/__init__.py +0 -0
  48. {testtools-2.9.0 → testtools-2.9.2}/tests/helpers.py +0 -0
  49. {testtools-2.9.0 → testtools-2.9.2}/tests/matchers/__init__.py +0 -0
  50. {testtools-2.9.0 → testtools-2.9.2}/tests/matchers/test_basic.py +0 -0
  51. {testtools-2.9.0 → testtools-2.9.2}/tests/matchers/test_const.py +0 -0
  52. {testtools-2.9.0 → testtools-2.9.2}/tests/matchers/test_datastructures.py +0 -0
  53. {testtools-2.9.0 → testtools-2.9.2}/tests/matchers/test_dict.py +0 -0
  54. {testtools-2.9.0 → testtools-2.9.2}/tests/matchers/test_doctest.py +0 -0
  55. {testtools-2.9.0 → testtools-2.9.2}/tests/matchers/test_exception.py +0 -0
  56. {testtools-2.9.0 → testtools-2.9.2}/tests/matchers/test_filesystem.py +0 -0
  57. {testtools-2.9.0 → testtools-2.9.2}/tests/matchers/test_higherorder.py +0 -0
  58. {testtools-2.9.0 → testtools-2.9.2}/tests/matchers/test_impl.py +0 -0
  59. {testtools-2.9.0 → testtools-2.9.2}/tests/matchers/test_warnings.py +0 -0
  60. {testtools-2.9.0 → testtools-2.9.2}/tests/samplecases.py +0 -0
  61. {testtools-2.9.0 → testtools-2.9.2}/tests/test_assert_that.py +0 -0
  62. {testtools-2.9.0 → testtools-2.9.2}/tests/test_compat.py +0 -0
  63. {testtools-2.9.0 → testtools-2.9.2}/tests/test_content.py +0 -0
  64. {testtools-2.9.0 → testtools-2.9.2}/tests/test_content_type.py +0 -0
  65. {testtools-2.9.0 → testtools-2.9.2}/tests/test_helpers.py +0 -0
  66. {testtools-2.9.0 → testtools-2.9.2}/tests/test_monkey.py +0 -0
  67. {testtools-2.9.0 → testtools-2.9.2}/tests/test_runtest.py +0 -0
  68. {testtools-2.9.0 → testtools-2.9.2}/tests/test_tags.py +0 -0
  69. {testtools-2.9.0 → testtools-2.9.2}/tests/test_with_with.py +0 -0
  70. {testtools-2.9.0 → testtools-2.9.2}/tests/twistedsupport/__init__.py +0 -0
  71. {testtools-2.9.0 → testtools-2.9.2}/tests/twistedsupport/_helpers.py +0 -0
  72. {testtools-2.9.0 → testtools-2.9.2}/tests/twistedsupport/test_deferred.py +0 -0
  73. {testtools-2.9.0 → testtools-2.9.2}/tests/twistedsupport/test_matchers.py +0 -0
  74. {testtools-2.9.0 → testtools-2.9.2}/tests/twistedsupport/test_runtest.py +0 -0
  75. {testtools-2.9.0 → testtools-2.9.2}/tests/twistedsupport/test_spinner.py +0 -0
  76. {testtools-2.9.0 → testtools-2.9.2}/testtools/__init__.py +0 -0
  77. {testtools-2.9.0 → testtools-2.9.2}/testtools/_version.pyi +0 -0
  78. {testtools-2.9.0 → testtools-2.9.2}/testtools/assertions.py +0 -0
  79. {testtools-2.9.0 → testtools-2.9.2}/testtools/compat.py +0 -0
  80. {testtools-2.9.0 → testtools-2.9.2}/testtools/content.py +0 -0
  81. {testtools-2.9.0 → testtools-2.9.2}/testtools/content_type.py +0 -0
  82. {testtools-2.9.0 → testtools-2.9.2}/testtools/helpers.py +0 -0
  83. {testtools-2.9.0 → testtools-2.9.2}/testtools/matchers/__init__.py +0 -0
  84. {testtools-2.9.0 → testtools-2.9.2}/testtools/matchers/_basic.py +0 -0
  85. {testtools-2.9.0 → testtools-2.9.2}/testtools/matchers/_const.py +0 -0
  86. {testtools-2.9.0 → testtools-2.9.2}/testtools/matchers/_datastructures.py +0 -0
  87. {testtools-2.9.0 → testtools-2.9.2}/testtools/matchers/_dict.py +0 -0
  88. {testtools-2.9.0 → testtools-2.9.2}/testtools/matchers/_doctest.py +0 -0
  89. {testtools-2.9.0 → testtools-2.9.2}/testtools/matchers/_exception.py +0 -0
  90. {testtools-2.9.0 → testtools-2.9.2}/testtools/matchers/_filesystem.py +0 -0
  91. {testtools-2.9.0 → testtools-2.9.2}/testtools/matchers/_higherorder.py +0 -0
  92. {testtools-2.9.0 → testtools-2.9.2}/testtools/matchers/_impl.py +0 -0
  93. {testtools-2.9.0 → testtools-2.9.2}/testtools/matchers/_warnings.py +0 -0
  94. {testtools-2.9.0 → testtools-2.9.2}/testtools/matchers/test.py +0 -0
  95. {testtools-2.9.0 → testtools-2.9.2}/testtools/monkey.py +0 -0
  96. {testtools-2.9.0 → testtools-2.9.2}/testtools/py.typed +0 -0
  97. {testtools-2.9.0 → testtools-2.9.2}/testtools/run.py +0 -0
  98. {testtools-2.9.0 → testtools-2.9.2}/testtools/tags.py +0 -0
  99. {testtools-2.9.0 → testtools-2.9.2}/testtools/testresult/__init__.py +0 -0
  100. {testtools-2.9.0 → testtools-2.9.2}/testtools/tests/__init__.py +0 -0
  101. {testtools-2.9.0 → testtools-2.9.2}/testtools/tests/helpers.py +0 -0
  102. {testtools-2.9.0 → testtools-2.9.2}/testtools/tests/matchers/__init__.py +0 -0
  103. {testtools-2.9.0 → testtools-2.9.2}/testtools/tests/matchers/helpers.py +0 -0
  104. {testtools-2.9.0 → testtools-2.9.2}/testtools/testsuite.py +0 -0
  105. {testtools-2.9.0 → testtools-2.9.2}/testtools/twistedsupport/__init__.py +0 -0
  106. {testtools-2.9.0 → testtools-2.9.2}/testtools/twistedsupport/_deferred.py +0 -0
  107. {testtools-2.9.0 → testtools-2.9.2}/testtools/twistedsupport/_deferreddebug.py +0 -0
  108. {testtools-2.9.0 → testtools-2.9.2}/testtools/twistedsupport/_matchers.py +0 -0
  109. {testtools-2.9.0 → testtools-2.9.2}/testtools/twistedsupport/_spinner.py +0 -0
  110. {testtools-2.9.0 → testtools-2.9.2}/tox.ini +0 -0
@@ -22,9 +22,9 @@ jobs:
22
22
  id-token: write
23
23
 
24
24
  steps:
25
- - uses: actions/checkout@v6
25
+ - uses: actions/checkout@v7
26
26
  - name: Set up Python
27
- uses: actions/setup-python@v6
27
+ uses: actions/setup-python@v7
28
28
  with:
29
29
  python-version: '3.x'
30
30
  cache: 'pip'
@@ -7,17 +7,17 @@ jobs:
7
7
  lint:
8
8
  runs-on: ubuntu-latest
9
9
  steps:
10
- - uses: actions/checkout@v6
10
+ - uses: actions/checkout@v7
11
11
  with:
12
12
  fetch-depth: 0
13
13
 
14
14
  - name: Set up Python 3.13
15
- uses: actions/setup-python@v6
15
+ uses: actions/setup-python@v7
16
16
  with:
17
17
  python-version: "3.13"
18
18
 
19
19
  - name: Cache
20
- uses: actions/cache@v5
20
+ uses: actions/cache@v6
21
21
  with:
22
22
  path: ~/.cache/pip
23
23
  key: ${{ runner.os }}-lint-${{ hashFiles('**/setup.py') }}
@@ -44,20 +44,20 @@ jobs:
44
44
  strategy:
45
45
  fail-fast: false
46
46
  matrix:
47
- python-version: ["3.10", "3.11", "3.12", "3.13", "3.14", "pypy3.10"]
47
+ python-version: ["3.10", "3.11", "3.12", "3.13", "3.14", "pypy3.11"]
48
48
 
49
49
  steps:
50
- - uses: actions/checkout@v6
50
+ - uses: actions/checkout@v7
51
51
  with:
52
52
  fetch-depth: 0
53
53
 
54
54
  - name: Set up Python ${{ matrix.python-version }}
55
- uses: actions/setup-python@v6
55
+ uses: actions/setup-python@v7
56
56
  with:
57
57
  python-version: ${{ matrix.python-version }}
58
58
 
59
59
  - name: Cache
60
- uses: actions/cache@v5
60
+ uses: actions/cache@v6
61
61
  with:
62
62
  path: ~/.cache/pip
63
63
  key: ${{ matrix.os }}-${{ matrix.python-version }}-${{ hashFiles('**/setup.py') }}
@@ -77,17 +77,17 @@ jobs:
77
77
  docs:
78
78
  runs-on: ubuntu-latest
79
79
  steps:
80
- - uses: actions/checkout@v6
80
+ - uses: actions/checkout@v7
81
81
  with:
82
82
  fetch-depth: 0
83
83
 
84
84
  - name: Set up Python 3.13
85
- uses: actions/setup-python@v6
85
+ uses: actions/setup-python@v7
86
86
  with:
87
87
  python-version: "3.13"
88
88
 
89
89
  - name: Cache
90
- uses: actions/cache@v5
90
+ uses: actions/cache@v6
91
91
  with:
92
92
  path: ~/.cache/pip
93
93
  key: ${{ runner.os }}-docs-${{ hashFiles('**/setup.py') }}
@@ -6,6 +6,26 @@ Changes and improvements to testtools_, grouped by release.
6
6
  NEXT
7
7
  ~~~~
8
8
 
9
+ 2.9.2
10
+ ~~~~~
11
+
12
+ Improvements
13
+ ------------
14
+ * Add support for ``TestCase.subTest``, reporting each subtest with its own
15
+ parameters. (Cyril Roelandt, Jelmer Vernooij, #317, #633)
16
+
17
+ * Align the return type of ``TestCase.run`` with the stdlib, which allows
18
+ ``None``. (Stephen Finucane, #636)
19
+
20
+ 2.9.1
21
+ ~~~~~
22
+
23
+ Improvements
24
+ ------------
25
+ * Don't leak testtools-specific exception details into
26
+ ``unittest.TestResult`` error reports when using a stdlib ``TestResult``.
27
+ (Jelmer Vernooij, #607)
28
+
9
29
  2.9.0
10
30
  ~~~~~
11
31
 
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.4
1
+ Metadata-Version: 2.5
2
2
  Name: testtools
3
- Version: 2.9.0
3
+ Version: 2.9.2
4
4
  Summary: Extensions to the Python standard library unit testing framework
5
5
  Project-URL: Homepage, https://github.com/testing-cabal/testtools
6
6
  Author-email: "Jonathan M. Lange" <jml+testtools@mumak.net>
@@ -26,9 +26,10 @@ Classifier: Typing :: Typed
26
26
  Requires-Python: >=3.10
27
27
  Provides-Extra: dev
28
28
  Requires-Dist: mypy>=1.20.0; extra == 'dev'
29
- Requires-Dist: ruff==0.15.9; extra == 'dev'
29
+ Requires-Dist: ruff==0.17.5; extra == 'dev'
30
30
  Requires-Dist: typing-extensions; (python_version < '3.11') and extra == 'dev'
31
31
  Provides-Extra: test
32
+ Requires-Dist: fixtures; extra == 'test'
32
33
  Requires-Dist: testresources; extra == 'test'
33
34
  Requires-Dist: testscenarios; extra == 'test'
34
35
  Provides-Extra: twisted
@@ -362,7 +362,7 @@ Test Doubles
362
362
  ------------
363
363
 
364
364
  In testtools.testresult.doubles there are several test doubles that testtools
365
- uses for its own testing: ``Python3TestResult``, and ``ExtendedTestResult``.
365
+ uses for its own testing: ``LoggingTestResult``, and ``ExtendedTestResult``.
366
366
  These TestResult objects implement a single variation of
367
367
  the TestResult API each, and log activity to a list ``self._events``. These are
368
368
  made available for the convenience of people writing their own extensions.
@@ -34,10 +34,10 @@ requires-python = ">=3.10"
34
34
  Homepage = "https://github.com/testing-cabal/testtools"
35
35
 
36
36
  [project.optional-dependencies]
37
- test = ["testscenarios", "testresources"]
37
+ test = ["fixtures", "testscenarios", "testresources"]
38
38
  twisted = ["Twisted", "fixtures"]
39
39
  dev = [
40
- "ruff==0.15.9",
40
+ "ruff==0.17.5",
41
41
  "mypy>=1.20.0",
42
42
  "typing-extensions;python_version<'3.11'",
43
43
  ]
@@ -0,0 +1 @@
1
+ fixtures>=4.3.2
@@ -2,6 +2,8 @@
2
2
 
3
3
  import unittest
4
4
 
5
+ import fixtures
6
+
5
7
  from testtools import (
6
8
  TestCase,
7
9
  content,
@@ -15,23 +17,25 @@ from testtools.testresult.doubles import (
15
17
  ExtendedTestResult,
16
18
  )
17
19
 
18
- try:
19
- import fixtures
20
- except ImportError:
21
- fixtures = None # type: ignore
22
-
23
- try:
24
- from fixtures.tests.helpers import LoggingFixture
25
- except ImportError:
26
- LoggingFixture = None
27
20
 
21
+ class LoggingFixture(fixtures.Fixture):
22
+ def __init__(self, suffix: str = "", calls: list[str] | None = None) -> None:
23
+ super().__init__()
24
+ if calls is None:
25
+ calls = []
26
+ self.calls = calls
27
+ self.suffix = suffix
28
28
 
29
- class TestFixtureSupport(TestCase):
30
- def setUp(self):
29
+ def setUp(self) -> None:
31
30
  super().setUp()
32
- if fixtures is None or LoggingFixture is None:
33
- self.skipTest("Need fixtures")
31
+ self.calls.append("setUp" + self.suffix)
32
+ self.addCleanup(self.calls.append, "cleanUp" + self.suffix)
34
33
 
34
+ def reset(self) -> None:
35
+ self.calls.append("reset" + self.suffix)
36
+
37
+
38
+ class TestFixtureSupport(TestCase):
35
39
  def test_useFixture(self):
36
40
  fixture = LoggingFixture()
37
41
 
@@ -9,6 +9,8 @@ import unittest
9
9
  from textwrap import dedent
10
10
  from unittest import TestSuite
11
11
 
12
+ import fixtures
13
+
12
14
  import testtools
13
15
  from testtools import TestCase, run, skipUnless
14
16
  from testtools.matchers import (
@@ -17,29 +19,17 @@ from testtools.matchers import (
17
19
  MatchesRegex,
18
20
  )
19
21
 
20
- try:
21
- import fixtures
22
- except ImportError:
23
- fixtures = None # type: ignore
24
-
25
- try:
26
- import testresources
27
- except ImportError:
28
- testresources = None
29
-
30
-
31
- if fixtures:
32
22
 
33
- class SampleTestFixture(fixtures.Fixture):
34
- """Creates testtools.runexample temporarily."""
23
+ class SampleTestFixture(fixtures.Fixture):
24
+ """Creates testtools.runexample temporarily."""
35
25
 
36
- def __init__(self, broken=False):
37
- """Create a SampleTestFixture.
26
+ def __init__(self, broken=False):
27
+ """Create a SampleTestFixture.
38
28
 
39
- :param broken: If True, the sample file will not be importable.
40
- """
41
- if not broken:
42
- init_contents = b"""\
29
+ :param broken: If True, the sample file will not be importable.
30
+ """
31
+ if not broken:
32
+ init_contents = b"""\
43
33
  from testtools import TestCase
44
34
 
45
35
  class TestFoo(TestCase):
@@ -51,33 +41,31 @@ def test_suite():
51
41
  from unittest import TestLoader
52
42
  return TestLoader().loadTestsFromName(__name__)
53
43
  """
54
- else:
55
- init_contents = b"class not in\n"
56
- self.package = fixtures.PythonPackage(
57
- "runexample", [("__init__.py", init_contents)]
58
- )
59
-
60
- def setUp(self):
61
- super().setUp()
62
- self.useFixture(self.package)
63
- testtools.__path__.append(self.package.base)
64
- self.addCleanup(testtools.__path__.remove, self.package.base)
65
- self.addCleanup(sys.modules.pop, "testtools.runexample", None)
44
+ else:
45
+ init_contents = b"class not in\n"
46
+ self.package = fixtures.PythonPackage(
47
+ "runexample", [("__init__.py", init_contents)]
48
+ )
66
49
 
50
+ def setUp(self):
51
+ super().setUp()
52
+ self.useFixture(self.package)
53
+ testtools.__path__.append(self.package.base)
54
+ self.addCleanup(testtools.__path__.remove, self.package.base)
55
+ self.addCleanup(sys.modules.pop, "testtools.runexample", None)
67
56
 
68
- if fixtures and testresources:
69
57
 
70
- class SampleResourcedFixture(fixtures.Fixture):
71
- """Creates a test suite that uses testresources."""
58
+ class SampleResourcedFixture(fixtures.Fixture):
59
+ """Creates a test suite that uses testresources."""
72
60
 
73
- def __init__(self):
74
- super().__init__()
75
- self.package = fixtures.PythonPackage(
76
- "resourceexample",
77
- [
78
- (
79
- "__init__.py",
80
- b"""
61
+ def __init__(self):
62
+ super().__init__()
63
+ self.package = fixtures.PythonPackage(
64
+ "resourceexample",
65
+ [
66
+ (
67
+ "__init__.py",
68
+ b"""
81
69
  from fixtures import Fixture
82
70
  from testresources import (
83
71
  FixtureResource,
@@ -109,30 +97,28 @@ def test_suite():
109
97
  from unittest import TestLoader
110
98
  return OptimisingTestSuite(TestLoader().loadTestsFromName(__name__))
111
99
  """,
112
- )
113
- ],
114
- )
115
-
116
- def setUp(self):
117
- super().setUp()
118
- self.useFixture(self.package)
119
- self.addCleanup(testtools.__path__.remove, self.package.base)
120
- testtools.__path__.append(self.package.base)
100
+ )
101
+ ],
102
+ )
121
103
 
104
+ def setUp(self):
105
+ super().setUp()
106
+ self.useFixture(self.package)
107
+ self.addCleanup(testtools.__path__.remove, self.package.base)
108
+ testtools.__path__.append(self.package.base)
122
109
 
123
- if fixtures:
124
110
 
125
- class SampleLoadTestsPackage(fixtures.Fixture):
126
- """Creates a test suite package using load_tests."""
111
+ class SampleLoadTestsPackage(fixtures.Fixture):
112
+ """Creates a test suite package using load_tests."""
127
113
 
128
- def __init__(self):
129
- super().__init__()
130
- self.package = fixtures.PythonPackage(
131
- "discoverexample",
132
- [
133
- (
134
- "__init__.py",
135
- b"""
114
+ def __init__(self):
115
+ super().__init__()
116
+ self.package = fixtures.PythonPackage(
117
+ "discoverexample",
118
+ [
119
+ (
120
+ "__init__.py",
121
+ b"""
136
122
  from testtools import TestCase, clone_test_with_new_id
137
123
 
138
124
  class TestExample(TestCase):
@@ -143,22 +129,17 @@ def load_tests(loader, tests, pattern):
143
129
  tests.addTest(clone_test_with_new_id(tests._tests[1]._tests[0], "fred"))
144
130
  return tests
145
131
  """,
146
- )
147
- ],
148
- )
149
-
150
- def setUp(self):
151
- super().setUp()
152
- self.useFixture(self.package)
153
- self.addCleanup(sys.path.remove, self.package.base)
154
-
132
+ )
133
+ ],
134
+ )
155
135
 
156
- class TestRun(TestCase):
157
136
  def setUp(self):
158
137
  super().setUp()
159
- if fixtures is None:
160
- self.skipTest("Need fixtures")
138
+ self.useFixture(self.package)
139
+ self.addCleanup(sys.path.remove, self.package.base)
161
140
 
141
+
142
+ class TestRun(TestCase):
162
143
  def test_run_custom_list(self):
163
144
  self.useFixture(SampleTestFixture())
164
145
  tests = []
@@ -347,8 +328,6 @@ testtools.runexample.missingtest
347
328
  )
348
329
 
349
330
  def test_load_list_preserves_custom_suites(self):
350
- if testresources is None:
351
- self.skipTest("Need testresources")
352
331
  self.useFixture(SampleResourcedFixture())
353
332
  # We load two tests, not loading one. Both share a resource, so we
354
333
  # should see just one resource setup occur.