Skip to content

Commit 77d17aa

Browse files
authored
Merge pull request #551 from testing-cabal/move-tests
Move tests out of testtools/
2 parents 993df8c + a21157f commit 77d17aa

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+72
-61
lines changed

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ jobs:
7272
7373
- name: Run tests
7474
run: |
75-
python -W once -m testtools.run testtools.tests.test_suite
75+
python -W once -m testtools.run tests.test_suite
7676
7777
docs:
7878
runs-on: ubuntu-latest

.testr.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
[DEFAULT]
2-
test_command=${PYTHON:-python3} -m subunit.run $LISTOPT $IDOPTION testtools.tests.test_suite
2+
test_command=${PYTHON:-python3} -m subunit.run $LISTOPT $IDOPTION tests.test_suite
33
test_id_option=--load-list $IDFILE
44
test_list_option=--list

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ PYTHON=python3
44
SOURCES=$(shell find testtools -name "*.py")
55

66
check:
7-
PYTHONPATH=$(PWD) $(PYTHON) -m testtools.run testtools.tests.test_suite
7+
PYTHONPATH=$(PWD) $(PYTHON) -m testtools.run tests.test_suite
88

99
TAGS: ${SOURCES}
1010
ctags -e -R testtools/

doc/hacking.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ Users of testtools should never import a submodule in order to use a stable
103103
API. Unstable APIs like ``testtools.matchers`` and
104104
``testtools.deferredruntest`` should be exported as submodules.
105105

106-
Tests belong in ``testtools/tests/``.
106+
Tests belong in ``tests/``.
107107

108108

109109
Committing to trunk

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ ignore_missing_imports = true
7878
[[tool.mypy.overrides]]
7979
module = [
8080
# FIXME(stephenfin): We would like to remove all modules from this list
81-
# except testtools.tests (we're not sadists)
81+
# except tests (we're not sadists)
8282
"testtools.assertions",
8383
"testtools.compat",
8484
"testtools.content",
@@ -91,7 +91,7 @@ module = [
9191
"testtools.testresult.*",
9292
"testtools.testsuite",
9393
"testtools.twistedsupport.*",
94-
"testtools.tests.*",
94+
"tests.*",
9595
]
9696
disallow_untyped_calls = false
9797
disallow_untyped_defs = false

scripts/all-pythons

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ ROOT = os.path.dirname(os.path.dirname(__file__))
3131

3232
def run_for_python(version, result, tests):
3333
if not tests:
34-
tests = ['testtools.tests.test_suite']
34+
tests = ['tests.test_suite']
3535
# XXX: This could probably be broken up and put into subunit.
3636
python = 'python%s' % (version,)
3737
# XXX: Correct API, but subunit doesn't support it. :(
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99

1010
def test_suite():
11-
from testtools.tests import (
11+
from . import (
1212
matchers,
1313
test_assert_that,
1414
test_compat,
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66

77
def test_suite():
8-
from testtools.tests.matchers import (
8+
from ..matchers import (
99
test_basic,
1010
test_const,
1111
test_datastructures,

0 commit comments

Comments
 (0)