You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@buildstream.apache.org by tv...@apache.org on 2022/02/23 06:19:02 UTC

[buildstream] branch tristan/privatize-testing-api created (now 29d1c22)

This is an automated email from the ASF dual-hosted git repository.

tvb pushed a change to branch tristan/privatize-testing-api
in repository https://gitbox.apache.org/repos/asf/buildstream.git.


      at 29d1c22  Make buildstream.testing private -> buildstream._testing

This branch includes the following new commits:

     new 29d1c22  Make buildstream.testing private -> buildstream._testing

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


[buildstream] 01/01: Make buildstream.testing private -> buildstream._testing

Posted by tv...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

tvb pushed a commit to branch tristan/privatize-testing-api
in repository https://gitbox.apache.org/repos/asf/buildstream.git

commit 29d1c22fe4545cd322efea6a061fe67b2062b3c1
Author: Tristan van Berkom <tr...@codethink.co.uk>
AuthorDate: Wed Feb 23 15:17:13 2022 +0900

    Make buildstream.testing private -> buildstream._testing
    
    The testing API surface for plugins is not ready for prime time
    stability guarantees, so for now we are going to make it a private
    interface so that plugin packages can use it at their own risk,
    until such a time that the testing API surface is ready for prime time.
---
 src/buildstream/{testing => _testing}/__init__.py                 | 0
 src/buildstream/{testing => _testing}/_cachekeys.py               | 0
 src/buildstream/{testing => _testing}/_fixtures.py                | 0
 src/buildstream/{testing => _testing}/_sourcetests/__init__.py    | 0
 .../{testing => _testing}/_sourcetests/build_checkout.py          | 0
 src/buildstream/{testing => _testing}/_sourcetests/conftest.py    | 0
 src/buildstream/{testing => _testing}/_sourcetests/fetch.py       | 0
 src/buildstream/{testing => _testing}/_sourcetests/mirror.py      | 0
 .../{testing => _testing}/_sourcetests/project/elements/base.bst  | 0
 .../_sourcetests/project/elements/base/base-alpine.bst            | 0
 .../_sourcetests/project/elements/import-bin.bst                  | 0
 .../_sourcetests/project/elements/import-dev.bst                  | 0
 .../project/elements/multiple_targets/dependency/horsey.bst       | 0
 .../project/elements/multiple_targets/dependency/pony.bst         | 0
 .../project/elements/multiple_targets/dependency/zebry.bst        | 0
 .../_sourcetests/project/elements/multiple_targets/order/0.bst    | 0
 .../_sourcetests/project/elements/multiple_targets/order/1.bst    | 0
 .../_sourcetests/project/elements/multiple_targets/order/2.bst    | 0
 .../_sourcetests/project/elements/multiple_targets/order/3.bst    | 0
 .../_sourcetests/project/elements/multiple_targets/order/4.bst    | 0
 .../_sourcetests/project/elements/multiple_targets/order/5.bst    | 0
 .../_sourcetests/project/elements/multiple_targets/order/6.bst    | 0
 .../_sourcetests/project/elements/multiple_targets/order/7.bst    | 0
 .../_sourcetests/project/elements/multiple_targets/order/8.bst    | 0
 .../_sourcetests/project/elements/multiple_targets/order/9.bst    | 0
 .../_sourcetests/project/elements/multiple_targets/order/run.bst  | 0
 .../{testing => _testing}/_sourcetests/project/files/bar          | 0
 .../_sourcetests/project/files/bin-files/usr/bin/hello            | 0
 .../_sourcetests/project/files/dev-files/usr/include/pony.h       | 0
 .../_sourcetests/project/files/etc-files/etc/buildstream/config   | 0
 .../{testing => _testing}/_sourcetests/project/files/foo          | 0
 .../_sourcetests/project/files/source-bundle/llamas.txt           | 0
 .../project/files/sub-project/elements/import-etc.bst             | 0
 .../project/files/sub-project/files/etc-files/etc/animal.conf     | 0
 .../_sourcetests/project/files/sub-project/project.conf           | 0
 .../{testing => _testing}/_sourcetests/project/project.conf       | 0
 .../{testing => _testing}/_sourcetests/source_determinism.py      | 0
 src/buildstream/{testing => _testing}/_sourcetests/track.py       | 0
 .../{testing => _testing}/_sourcetests/track_cross_junction.py    | 0
 src/buildstream/{testing => _testing}/_sourcetests/utils.py       | 0
 src/buildstream/{testing => _testing}/_sourcetests/workspace.py   | 0
 src/buildstream/{testing => _testing}/_update_cachekeys.py        | 0
 src/buildstream/{testing => _testing}/_utils/__init__.py          | 0
 src/buildstream/{testing => _testing}/_utils/junction.py          | 0
 src/buildstream/{testing => _testing}/_utils/site.py              | 0
 src/buildstream/{testing => _testing}/_yaml.py                    | 0
 src/buildstream/{testing => _testing}/integration.py              | 0
 src/buildstream/{testing => _testing}/repo.py                     | 0
 src/buildstream/{testing => _testing}/runcli.py                   | 0
 tests/artifactcache/capabilities.py                               | 2 +-
 tests/artifactcache/config.py                                     | 4 ++--
 tests/artifactcache/expiry.py                                     | 4 ++--
 tests/artifactcache/junctions.py                                  | 2 +-
 tests/artifactcache/pull.py                                       | 2 +-
 tests/artifactcache/push.py                                       | 2 +-
 tests/cachekey/cachekey.py                                        | 6 +++---
 tests/conftest.py                                                 | 8 ++++----
 tests/elements/filter.py                                          | 4 ++--
 tests/examples/autotools.py                                       | 6 +++---
 tests/examples/developing.py                                      | 6 +++---
 tests/examples/first-project.py                                   | 6 +++---
 tests/examples/integration-commands.py                            | 4 ++--
 tests/examples/junctions.py                                       | 4 ++--
 tests/examples/running-commands.py                                | 4 ++--
 tests/format/assertion.py                                         | 2 +-
 tests/format/dependencies.py                                      | 2 +-
 tests/format/elementnames.py                                      | 2 +-
 tests/format/include.py                                           | 4 ++--
 tests/format/invalid_keys.py                                      | 2 +-
 tests/format/junctions.py                                         | 4 ++--
 tests/format/link.py                                              | 2 +-
 tests/format/listdirectiveerrors.py                               | 2 +-
 tests/format/option-list-directive.py                             | 2 +-
 tests/format/optionarch.py                                        | 2 +-
 tests/format/optionbool.py                                        | 2 +-
 tests/format/optioneltmask.py                                     | 2 +-
 tests/format/optionenum.py                                        | 2 +-
 tests/format/optionexports.py                                     | 2 +-
 tests/format/optionflags.py                                       | 2 +-
 tests/format/optionos.py                                          | 2 +-
 tests/format/optionoverrides.py                                   | 2 +-
 tests/format/options.py                                           | 2 +-
 tests/format/project.py                                           | 2 +-
 tests/format/projectoverrides.py                                  | 2 +-
 tests/format/stack.py                                             | 2 +-
 tests/format/substitutions.py                                     | 2 +-
 tests/format/userconfig.py                                        | 2 +-
 tests/format/variables.py                                         | 2 +-
 tests/frontend/artifact_checkout.py                               | 2 +-
 tests/frontend/artifact_delete.py                                 | 2 +-
 tests/frontend/artifact_list_contents.py                          | 2 +-
 tests/frontend/artifact_log.py                                    | 2 +-
 tests/frontend/artifact_pull.py                                   | 2 +-
 tests/frontend/artifact_show.py                                   | 2 +-
 tests/frontend/buildcheckout.py                                   | 6 +++---
 tests/frontend/completions.py                                     | 2 +-
 tests/frontend/compose_splits.py                                  | 2 +-
 tests/frontend/configurable_warnings.py                           | 2 +-
 tests/frontend/cross_junction_workspace.py                        | 4 ++--
 tests/frontend/default_target.py                                  | 2 +-
 tests/frontend/fetch.py                                           | 2 +-
 tests/frontend/help.py                                            | 2 +-
 tests/frontend/init.py                                            | 2 +-
 tests/frontend/large_directory.py                                 | 2 +-
 tests/frontend/logging.py                                         | 4 ++--
 tests/frontend/mirror.py                                          | 4 ++--
 tests/frontend/order.py                                           | 4 ++--
 tests/frontend/overlaps.py                                        | 2 +-
 tests/frontend/progress.py                                        | 2 +-
 tests/frontend/pull.py                                            | 4 ++--
 tests/frontend/push.py                                            | 4 ++--
 tests/frontend/rebuild.py                                         | 2 +-
 tests/frontend/remote-caches.py                                   | 2 +-
 tests/frontend/show.py                                            | 2 +-
 tests/frontend/source_checkout.py                                 | 2 +-
 tests/frontend/track.py                                           | 6 +++---
 tests/frontend/version.py                                         | 2 +-
 tests/frontend/workspace.py                                       | 4 ++--
 tests/integration/artifact.py                                     | 4 ++--
 tests/integration/autotools.py                                    | 6 +++---
 tests/integration/build-uid.py                                    | 4 ++--
 tests/integration/cachedfail.py                                   | 4 ++--
 tests/integration/compose-symlinks.py                             | 2 +-
 tests/integration/compose.py                                      | 6 +++---
 tests/integration/filter.py                                       | 6 +++---
 tests/integration/import.py                                       | 4 ++--
 tests/integration/interactive_build.py                            | 4 ++--
 tests/integration/manual.py                                       | 4 ++--
 tests/integration/messages.py                                     | 4 ++--
 tests/integration/pip_source.py                                   | 6 +++---
 tests/integration/pullbuildtrees.py                               | 4 ++--
 tests/integration/sandbox.py                                      | 4 ++--
 tests/integration/script.py                                       | 4 ++--
 tests/integration/shell.py                                        | 4 ++--
 tests/integration/shellbuildtrees.py                              | 4 ++--
 tests/integration/sockets.py                                      | 4 ++--
 tests/integration/source-determinism.py                           | 4 ++--
 tests/integration/stack.py                                        | 4 ++--
 tests/integration/symlinks.py                                     | 4 ++--
 tests/integration/workspace.py                                    | 4 ++--
 tests/internals/storage_vdir_import.py                            | 2 +-
 tests/internals/utils_move_atomic.py                              | 2 +-
 tests/plugins/loading.py                                          | 2 +-
 tests/plugins/shadow.py                                           | 2 +-
 tests/remotecache/simple.py                                       | 4 ++--
 tests/remoteexecution/buildfail.py                                | 2 +-
 tests/remoteexecution/buildtree.py                                | 2 +-
 tests/remoteexecution/junction.py                                 | 4 ++--
 tests/remoteexecution/remotecache.py                              | 4 ++--
 tests/remoteexecution/simple.py                                   | 4 ++--
 tests/remoteexecution/workspace.py                                | 4 ++--
 tests/sandboxes/missing-command.py                                | 2 +-
 tests/sandboxes/missing_dependencies.py                           | 4 ++--
 tests/sandboxes/remote-exec-config.py                             | 2 +-
 tests/sandboxes/selection.py                                      | 2 +-
 tests/sourcecache/cache.py                                        | 2 +-
 tests/sourcecache/capabilities.py                                 | 2 +-
 tests/sourcecache/config.py                                       | 2 +-
 tests/sourcecache/fetch.py                                        | 4 ++--
 tests/sourcecache/push.py                                         | 4 ++--
 tests/sourcecache/source-checkout.py                              | 2 +-
 tests/sourcecache/staging.py                                      | 2 +-
 tests/sourcecache/workspace.py                                    | 2 +-
 tests/sources/bzr.py                                              | 8 ++++----
 tests/sources/git.py                                              | 8 ++++----
 tests/sources/keytest.py                                          | 4 ++--
 tests/sources/local.py                                            | 4 ++--
 tests/sources/no_fetch_cached.py                                  | 8 ++++----
 tests/sources/patch.py                                            | 2 +-
 tests/sources/pip.py                                              | 2 +-
 tests/sources/previous_source_access.py                           | 4 ++--
 tests/sources/remote.py                                           | 6 +++---
 tests/sources/tar.py                                              | 6 +++---
 tests/sources/variables.py                                        | 2 +-
 tests/sources/zip.py                                              | 4 ++--
 tests/testutils/element_generators.py                             | 2 +-
 tests/testutils/junction.py                                       | 2 +-
 tests/testutils/repo/bzr.py                                       | 4 ++--
 tests/testutils/repo/git.py                                       | 4 ++--
 tests/testutils/repo/tar.py                                       | 2 +-
 tests/testutils/repo/zip.py                                       | 2 +-
 181 files changed, 214 insertions(+), 214 deletions(-)

diff --git a/src/buildstream/testing/__init__.py b/src/buildstream/_testing/__init__.py
similarity index 100%
rename from src/buildstream/testing/__init__.py
rename to src/buildstream/_testing/__init__.py
diff --git a/src/buildstream/testing/_cachekeys.py b/src/buildstream/_testing/_cachekeys.py
similarity index 100%
rename from src/buildstream/testing/_cachekeys.py
rename to src/buildstream/_testing/_cachekeys.py
diff --git a/src/buildstream/testing/_fixtures.py b/src/buildstream/_testing/_fixtures.py
similarity index 100%
rename from src/buildstream/testing/_fixtures.py
rename to src/buildstream/_testing/_fixtures.py
diff --git a/src/buildstream/testing/_sourcetests/__init__.py b/src/buildstream/_testing/_sourcetests/__init__.py
similarity index 100%
rename from src/buildstream/testing/_sourcetests/__init__.py
rename to src/buildstream/_testing/_sourcetests/__init__.py
diff --git a/src/buildstream/testing/_sourcetests/build_checkout.py b/src/buildstream/_testing/_sourcetests/build_checkout.py
similarity index 100%
rename from src/buildstream/testing/_sourcetests/build_checkout.py
rename to src/buildstream/_testing/_sourcetests/build_checkout.py
diff --git a/src/buildstream/testing/_sourcetests/conftest.py b/src/buildstream/_testing/_sourcetests/conftest.py
similarity index 100%
rename from src/buildstream/testing/_sourcetests/conftest.py
rename to src/buildstream/_testing/_sourcetests/conftest.py
diff --git a/src/buildstream/testing/_sourcetests/fetch.py b/src/buildstream/_testing/_sourcetests/fetch.py
similarity index 100%
rename from src/buildstream/testing/_sourcetests/fetch.py
rename to src/buildstream/_testing/_sourcetests/fetch.py
diff --git a/src/buildstream/testing/_sourcetests/mirror.py b/src/buildstream/_testing/_sourcetests/mirror.py
similarity index 100%
rename from src/buildstream/testing/_sourcetests/mirror.py
rename to src/buildstream/_testing/_sourcetests/mirror.py
diff --git a/src/buildstream/testing/_sourcetests/project/elements/base.bst b/src/buildstream/_testing/_sourcetests/project/elements/base.bst
similarity index 100%
rename from src/buildstream/testing/_sourcetests/project/elements/base.bst
rename to src/buildstream/_testing/_sourcetests/project/elements/base.bst
diff --git a/src/buildstream/testing/_sourcetests/project/elements/base/base-alpine.bst b/src/buildstream/_testing/_sourcetests/project/elements/base/base-alpine.bst
similarity index 100%
rename from src/buildstream/testing/_sourcetests/project/elements/base/base-alpine.bst
rename to src/buildstream/_testing/_sourcetests/project/elements/base/base-alpine.bst
diff --git a/src/buildstream/testing/_sourcetests/project/elements/import-bin.bst b/src/buildstream/_testing/_sourcetests/project/elements/import-bin.bst
similarity index 100%
rename from src/buildstream/testing/_sourcetests/project/elements/import-bin.bst
rename to src/buildstream/_testing/_sourcetests/project/elements/import-bin.bst
diff --git a/src/buildstream/testing/_sourcetests/project/elements/import-dev.bst b/src/buildstream/_testing/_sourcetests/project/elements/import-dev.bst
similarity index 100%
rename from src/buildstream/testing/_sourcetests/project/elements/import-dev.bst
rename to src/buildstream/_testing/_sourcetests/project/elements/import-dev.bst
diff --git a/src/buildstream/testing/_sourcetests/project/elements/multiple_targets/dependency/horsey.bst b/src/buildstream/_testing/_sourcetests/project/elements/multiple_targets/dependency/horsey.bst
similarity index 100%
rename from src/buildstream/testing/_sourcetests/project/elements/multiple_targets/dependency/horsey.bst
rename to src/buildstream/_testing/_sourcetests/project/elements/multiple_targets/dependency/horsey.bst
diff --git a/src/buildstream/testing/_sourcetests/project/elements/multiple_targets/dependency/pony.bst b/src/buildstream/_testing/_sourcetests/project/elements/multiple_targets/dependency/pony.bst
similarity index 100%
rename from src/buildstream/testing/_sourcetests/project/elements/multiple_targets/dependency/pony.bst
rename to src/buildstream/_testing/_sourcetests/project/elements/multiple_targets/dependency/pony.bst
diff --git a/src/buildstream/testing/_sourcetests/project/elements/multiple_targets/dependency/zebry.bst b/src/buildstream/_testing/_sourcetests/project/elements/multiple_targets/dependency/zebry.bst
similarity index 100%
rename from src/buildstream/testing/_sourcetests/project/elements/multiple_targets/dependency/zebry.bst
rename to src/buildstream/_testing/_sourcetests/project/elements/multiple_targets/dependency/zebry.bst
diff --git a/src/buildstream/testing/_sourcetests/project/elements/multiple_targets/order/0.bst b/src/buildstream/_testing/_sourcetests/project/elements/multiple_targets/order/0.bst
similarity index 100%
rename from src/buildstream/testing/_sourcetests/project/elements/multiple_targets/order/0.bst
rename to src/buildstream/_testing/_sourcetests/project/elements/multiple_targets/order/0.bst
diff --git a/src/buildstream/testing/_sourcetests/project/elements/multiple_targets/order/1.bst b/src/buildstream/_testing/_sourcetests/project/elements/multiple_targets/order/1.bst
similarity index 100%
rename from src/buildstream/testing/_sourcetests/project/elements/multiple_targets/order/1.bst
rename to src/buildstream/_testing/_sourcetests/project/elements/multiple_targets/order/1.bst
diff --git a/src/buildstream/testing/_sourcetests/project/elements/multiple_targets/order/2.bst b/src/buildstream/_testing/_sourcetests/project/elements/multiple_targets/order/2.bst
similarity index 100%
rename from src/buildstream/testing/_sourcetests/project/elements/multiple_targets/order/2.bst
rename to src/buildstream/_testing/_sourcetests/project/elements/multiple_targets/order/2.bst
diff --git a/src/buildstream/testing/_sourcetests/project/elements/multiple_targets/order/3.bst b/src/buildstream/_testing/_sourcetests/project/elements/multiple_targets/order/3.bst
similarity index 100%
rename from src/buildstream/testing/_sourcetests/project/elements/multiple_targets/order/3.bst
rename to src/buildstream/_testing/_sourcetests/project/elements/multiple_targets/order/3.bst
diff --git a/src/buildstream/testing/_sourcetests/project/elements/multiple_targets/order/4.bst b/src/buildstream/_testing/_sourcetests/project/elements/multiple_targets/order/4.bst
similarity index 100%
rename from src/buildstream/testing/_sourcetests/project/elements/multiple_targets/order/4.bst
rename to src/buildstream/_testing/_sourcetests/project/elements/multiple_targets/order/4.bst
diff --git a/src/buildstream/testing/_sourcetests/project/elements/multiple_targets/order/5.bst b/src/buildstream/_testing/_sourcetests/project/elements/multiple_targets/order/5.bst
similarity index 100%
rename from src/buildstream/testing/_sourcetests/project/elements/multiple_targets/order/5.bst
rename to src/buildstream/_testing/_sourcetests/project/elements/multiple_targets/order/5.bst
diff --git a/src/buildstream/testing/_sourcetests/project/elements/multiple_targets/order/6.bst b/src/buildstream/_testing/_sourcetests/project/elements/multiple_targets/order/6.bst
similarity index 100%
rename from src/buildstream/testing/_sourcetests/project/elements/multiple_targets/order/6.bst
rename to src/buildstream/_testing/_sourcetests/project/elements/multiple_targets/order/6.bst
diff --git a/src/buildstream/testing/_sourcetests/project/elements/multiple_targets/order/7.bst b/src/buildstream/_testing/_sourcetests/project/elements/multiple_targets/order/7.bst
similarity index 100%
rename from src/buildstream/testing/_sourcetests/project/elements/multiple_targets/order/7.bst
rename to src/buildstream/_testing/_sourcetests/project/elements/multiple_targets/order/7.bst
diff --git a/src/buildstream/testing/_sourcetests/project/elements/multiple_targets/order/8.bst b/src/buildstream/_testing/_sourcetests/project/elements/multiple_targets/order/8.bst
similarity index 100%
rename from src/buildstream/testing/_sourcetests/project/elements/multiple_targets/order/8.bst
rename to src/buildstream/_testing/_sourcetests/project/elements/multiple_targets/order/8.bst
diff --git a/src/buildstream/testing/_sourcetests/project/elements/multiple_targets/order/9.bst b/src/buildstream/_testing/_sourcetests/project/elements/multiple_targets/order/9.bst
similarity index 100%
rename from src/buildstream/testing/_sourcetests/project/elements/multiple_targets/order/9.bst
rename to src/buildstream/_testing/_sourcetests/project/elements/multiple_targets/order/9.bst
diff --git a/src/buildstream/testing/_sourcetests/project/elements/multiple_targets/order/run.bst b/src/buildstream/_testing/_sourcetests/project/elements/multiple_targets/order/run.bst
similarity index 100%
rename from src/buildstream/testing/_sourcetests/project/elements/multiple_targets/order/run.bst
rename to src/buildstream/_testing/_sourcetests/project/elements/multiple_targets/order/run.bst
diff --git a/src/buildstream/testing/_sourcetests/project/files/bar b/src/buildstream/_testing/_sourcetests/project/files/bar
similarity index 100%
rename from src/buildstream/testing/_sourcetests/project/files/bar
rename to src/buildstream/_testing/_sourcetests/project/files/bar
diff --git a/src/buildstream/testing/_sourcetests/project/files/bin-files/usr/bin/hello b/src/buildstream/_testing/_sourcetests/project/files/bin-files/usr/bin/hello
similarity index 100%
rename from src/buildstream/testing/_sourcetests/project/files/bin-files/usr/bin/hello
rename to src/buildstream/_testing/_sourcetests/project/files/bin-files/usr/bin/hello
diff --git a/src/buildstream/testing/_sourcetests/project/files/dev-files/usr/include/pony.h b/src/buildstream/_testing/_sourcetests/project/files/dev-files/usr/include/pony.h
similarity index 100%
rename from src/buildstream/testing/_sourcetests/project/files/dev-files/usr/include/pony.h
rename to src/buildstream/_testing/_sourcetests/project/files/dev-files/usr/include/pony.h
diff --git a/src/buildstream/testing/_sourcetests/project/files/etc-files/etc/buildstream/config b/src/buildstream/_testing/_sourcetests/project/files/etc-files/etc/buildstream/config
similarity index 100%
rename from src/buildstream/testing/_sourcetests/project/files/etc-files/etc/buildstream/config
rename to src/buildstream/_testing/_sourcetests/project/files/etc-files/etc/buildstream/config
diff --git a/src/buildstream/testing/_sourcetests/project/files/foo b/src/buildstream/_testing/_sourcetests/project/files/foo
similarity index 100%
rename from src/buildstream/testing/_sourcetests/project/files/foo
rename to src/buildstream/_testing/_sourcetests/project/files/foo
diff --git a/src/buildstream/testing/_sourcetests/project/files/source-bundle/llamas.txt b/src/buildstream/_testing/_sourcetests/project/files/source-bundle/llamas.txt
similarity index 100%
rename from src/buildstream/testing/_sourcetests/project/files/source-bundle/llamas.txt
rename to src/buildstream/_testing/_sourcetests/project/files/source-bundle/llamas.txt
diff --git a/src/buildstream/testing/_sourcetests/project/files/sub-project/elements/import-etc.bst b/src/buildstream/_testing/_sourcetests/project/files/sub-project/elements/import-etc.bst
similarity index 100%
rename from src/buildstream/testing/_sourcetests/project/files/sub-project/elements/import-etc.bst
rename to src/buildstream/_testing/_sourcetests/project/files/sub-project/elements/import-etc.bst
diff --git a/src/buildstream/testing/_sourcetests/project/files/sub-project/files/etc-files/etc/animal.conf b/src/buildstream/_testing/_sourcetests/project/files/sub-project/files/etc-files/etc/animal.conf
similarity index 100%
rename from src/buildstream/testing/_sourcetests/project/files/sub-project/files/etc-files/etc/animal.conf
rename to src/buildstream/_testing/_sourcetests/project/files/sub-project/files/etc-files/etc/animal.conf
diff --git a/src/buildstream/testing/_sourcetests/project/files/sub-project/project.conf b/src/buildstream/_testing/_sourcetests/project/files/sub-project/project.conf
similarity index 100%
rename from src/buildstream/testing/_sourcetests/project/files/sub-project/project.conf
rename to src/buildstream/_testing/_sourcetests/project/files/sub-project/project.conf
diff --git a/src/buildstream/testing/_sourcetests/project/project.conf b/src/buildstream/_testing/_sourcetests/project/project.conf
similarity index 100%
rename from src/buildstream/testing/_sourcetests/project/project.conf
rename to src/buildstream/_testing/_sourcetests/project/project.conf
diff --git a/src/buildstream/testing/_sourcetests/source_determinism.py b/src/buildstream/_testing/_sourcetests/source_determinism.py
similarity index 100%
rename from src/buildstream/testing/_sourcetests/source_determinism.py
rename to src/buildstream/_testing/_sourcetests/source_determinism.py
diff --git a/src/buildstream/testing/_sourcetests/track.py b/src/buildstream/_testing/_sourcetests/track.py
similarity index 100%
rename from src/buildstream/testing/_sourcetests/track.py
rename to src/buildstream/_testing/_sourcetests/track.py
diff --git a/src/buildstream/testing/_sourcetests/track_cross_junction.py b/src/buildstream/_testing/_sourcetests/track_cross_junction.py
similarity index 100%
rename from src/buildstream/testing/_sourcetests/track_cross_junction.py
rename to src/buildstream/_testing/_sourcetests/track_cross_junction.py
diff --git a/src/buildstream/testing/_sourcetests/utils.py b/src/buildstream/_testing/_sourcetests/utils.py
similarity index 100%
rename from src/buildstream/testing/_sourcetests/utils.py
rename to src/buildstream/_testing/_sourcetests/utils.py
diff --git a/src/buildstream/testing/_sourcetests/workspace.py b/src/buildstream/_testing/_sourcetests/workspace.py
similarity index 100%
rename from src/buildstream/testing/_sourcetests/workspace.py
rename to src/buildstream/_testing/_sourcetests/workspace.py
diff --git a/src/buildstream/testing/_update_cachekeys.py b/src/buildstream/_testing/_update_cachekeys.py
similarity index 100%
rename from src/buildstream/testing/_update_cachekeys.py
rename to src/buildstream/_testing/_update_cachekeys.py
diff --git a/src/buildstream/testing/_utils/__init__.py b/src/buildstream/_testing/_utils/__init__.py
similarity index 100%
rename from src/buildstream/testing/_utils/__init__.py
rename to src/buildstream/_testing/_utils/__init__.py
diff --git a/src/buildstream/testing/_utils/junction.py b/src/buildstream/_testing/_utils/junction.py
similarity index 100%
rename from src/buildstream/testing/_utils/junction.py
rename to src/buildstream/_testing/_utils/junction.py
diff --git a/src/buildstream/testing/_utils/site.py b/src/buildstream/_testing/_utils/site.py
similarity index 100%
rename from src/buildstream/testing/_utils/site.py
rename to src/buildstream/_testing/_utils/site.py
diff --git a/src/buildstream/testing/_yaml.py b/src/buildstream/_testing/_yaml.py
similarity index 100%
rename from src/buildstream/testing/_yaml.py
rename to src/buildstream/_testing/_yaml.py
diff --git a/src/buildstream/testing/integration.py b/src/buildstream/_testing/integration.py
similarity index 100%
rename from src/buildstream/testing/integration.py
rename to src/buildstream/_testing/integration.py
diff --git a/src/buildstream/testing/repo.py b/src/buildstream/_testing/repo.py
similarity index 100%
rename from src/buildstream/testing/repo.py
rename to src/buildstream/_testing/repo.py
diff --git a/src/buildstream/testing/runcli.py b/src/buildstream/_testing/runcli.py
similarity index 100%
rename from src/buildstream/testing/runcli.py
rename to src/buildstream/_testing/runcli.py
diff --git a/tests/artifactcache/capabilities.py b/tests/artifactcache/capabilities.py
index 09a6b59..fc4de7e 100644
--- a/tests/artifactcache/capabilities.py
+++ b/tests/artifactcache/capabilities.py
@@ -7,7 +7,7 @@ import pytest
 from buildstream._project import Project
 
 from buildstream import _yaml
-from buildstream.testing.runcli import cli  # pylint: disable=unused-import
+from buildstream._testing.runcli import cli  # pylint: disable=unused-import
 from tests.testutils import dummy_context
 
 from tests.testutils.artifactshare import create_dummy_artifact_share
diff --git a/tests/artifactcache/config.py b/tests/artifactcache/config.py
index 6810911..d058719 100644
--- a/tests/artifactcache/config.py
+++ b/tests/artifactcache/config.py
@@ -11,8 +11,8 @@ from buildstream.utils import _deduplicate
 from buildstream import _yaml
 from buildstream.exceptions import ErrorDomain, LoadErrorReason
 
-from buildstream.testing import runcli
-from buildstream.testing.runcli import cli  # pylint: disable=unused-import
+from buildstream._testing import runcli
+from buildstream._testing.runcli import cli  # pylint: disable=unused-import
 
 from tests.testutils import dummy_context
 
diff --git a/tests/artifactcache/expiry.py b/tests/artifactcache/expiry.py
index 0381585..e4ce04e 100644
--- a/tests/artifactcache/expiry.py
+++ b/tests/artifactcache/expiry.py
@@ -26,8 +26,8 @@ import pytest
 
 from buildstream._cas import CASCache
 from buildstream.exceptions import ErrorDomain, LoadErrorReason
-from buildstream.testing import cli  # pylint: disable=unused-import
-from buildstream.testing._utils.site import have_subsecond_mtime
+from buildstream._testing import cli  # pylint: disable=unused-import
+from buildstream._testing._utils.site import have_subsecond_mtime
 
 from tests.testutils import create_element_size, wait_for_cache_granularity
 
diff --git a/tests/artifactcache/junctions.py b/tests/artifactcache/junctions.py
index c180de4..d727f3d 100644
--- a/tests/artifactcache/junctions.py
+++ b/tests/artifactcache/junctions.py
@@ -6,7 +6,7 @@ import shutil
 import pytest
 
 from buildstream import _yaml
-from buildstream.testing import cli  # pylint: disable=unused-import
+from buildstream._testing import cli  # pylint: disable=unused-import
 
 from tests.testutils import create_artifact_share, assert_shared, assert_not_shared
 
diff --git a/tests/artifactcache/pull.py b/tests/artifactcache/pull.py
index 28f8588..e6a909d 100644
--- a/tests/artifactcache/pull.py
+++ b/tests/artifactcache/pull.py
@@ -8,7 +8,7 @@ import pytest
 from buildstream import _yaml
 from buildstream._project import Project
 from buildstream._protos.build.bazel.remote.execution.v2 import remote_execution_pb2
-from buildstream.testing import cli  # pylint: disable=unused-import
+from buildstream._testing import cli  # pylint: disable=unused-import
 
 from tests.testutils import create_artifact_share, dummy_context
 
diff --git a/tests/artifactcache/push.py b/tests/artifactcache/push.py
index 24a1ee1..394975f 100644
--- a/tests/artifactcache/push.py
+++ b/tests/artifactcache/push.py
@@ -8,7 +8,7 @@ import pytest
 from buildstream import _yaml
 from buildstream._project import Project
 from buildstream._protos.build.bazel.remote.execution.v2 import remote_execution_pb2
-from buildstream.testing import cli  # pylint: disable=unused-import
+from buildstream._testing import cli  # pylint: disable=unused-import
 
 from tests.testutils import create_artifact_share, create_split_share, dummy_context
 
diff --git a/tests/cachekey/cachekey.py b/tests/cachekey/cachekey.py
index 00dd53f..94262bf 100644
--- a/tests/cachekey/cachekey.py
+++ b/tests/cachekey/cachekey.py
@@ -44,9 +44,9 @@ import os
 
 import pytest
 
-from buildstream.testing._cachekeys import check_cache_key_stability, _parse_output_keys
-from buildstream.testing.runcli import cli  # pylint: disable=unused-import
-from buildstream.testing._utils.site import HAVE_BZR, HAVE_GIT, IS_LINUX, MACHINE_ARCH
+from buildstream._testing._cachekeys import check_cache_key_stability, _parse_output_keys
+from buildstream._testing.runcli import cli  # pylint: disable=unused-import
+from buildstream._testing._utils.site import HAVE_BZR, HAVE_GIT, IS_LINUX, MACHINE_ARCH
 from buildstream.plugin import CoreWarnings
 from buildstream import _yaml
 
diff --git a/tests/conftest.py b/tests/conftest.py
index 2b68c2c..f58f419 100755
--- a/tests/conftest.py
+++ b/tests/conftest.py
@@ -23,12 +23,12 @@ import os
 import pkg_resources
 import pytest
 
-from buildstream.testing import register_repo_kind, sourcetests_collection_hook
-from buildstream.testing._fixtures import (  # pylint: disable=unused-import
+from buildstream._testing import register_repo_kind, sourcetests_collection_hook
+from buildstream._testing._fixtures import (  # pylint: disable=unused-import
     default_thread_number,
     thread_check,
 )
-from buildstream.testing.integration import integration_cache  # pylint: disable=unused-import
+from buildstream._testing.integration import integration_cache  # pylint: disable=unused-import
 
 
 from tests.testutils.repo.git import Git
@@ -137,7 +137,7 @@ register_repo_kind("zip", Zip, None)
 
 
 # This hook enables pytest to collect the templated source tests from
-# buildstream.testing
+# buildstream._testing
 def pytest_sessionstart(session):
     if session.config.getvalue("plugins"):
         # Enable all plugins that implement the 'buildstream.tests.source_plugins' hook
diff --git a/tests/elements/filter.py b/tests/elements/filter.py
index 443f64d..617ae16 100644
--- a/tests/elements/filter.py
+++ b/tests/elements/filter.py
@@ -6,8 +6,8 @@ import shutil
 
 import pytest
 
-from buildstream.testing import create_repo
-from buildstream.testing import cli  # pylint: disable=unused-import
+from buildstream._testing import create_repo
+from buildstream._testing import cli  # pylint: disable=unused-import
 from buildstream.exceptions import ErrorDomain
 from buildstream import _yaml
 
diff --git a/tests/examples/autotools.py b/tests/examples/autotools.py
index c2cd054..b2081da 100644
--- a/tests/examples/autotools.py
+++ b/tests/examples/autotools.py
@@ -4,9 +4,9 @@
 import os
 import pytest
 
-from buildstream.testing import cli_integration as cli  # pylint: disable=unused-import
-from buildstream.testing.integration import assert_contains
-from buildstream.testing._utils.site import IS_LINUX, MACHINE_ARCH, HAVE_SANDBOX
+from buildstream._testing import cli_integration as cli  # pylint: disable=unused-import
+from buildstream._testing.integration import assert_contains
+from buildstream._testing._utils.site import IS_LINUX, MACHINE_ARCH, HAVE_SANDBOX
 
 pytestmark = pytest.mark.integration
 
diff --git a/tests/examples/developing.py b/tests/examples/developing.py
index b936721..73cf387 100644
--- a/tests/examples/developing.py
+++ b/tests/examples/developing.py
@@ -4,9 +4,9 @@
 import os
 import pytest
 
-from buildstream.testing import cli_integration as cli  # pylint: disable=unused-import
-from buildstream.testing.integration import assert_contains
-from buildstream.testing._utils.site import IS_LINUX, MACHINE_ARCH, HAVE_SANDBOX
+from buildstream._testing import cli_integration as cli  # pylint: disable=unused-import
+from buildstream._testing.integration import assert_contains
+from buildstream._testing._utils.site import IS_LINUX, MACHINE_ARCH, HAVE_SANDBOX
 from tests.testutils import patch
 
 pytestmark = pytest.mark.integration
diff --git a/tests/examples/first-project.py b/tests/examples/first-project.py
index 8783c4a..e98fa92 100644
--- a/tests/examples/first-project.py
+++ b/tests/examples/first-project.py
@@ -4,9 +4,9 @@
 import os
 import pytest
 
-from buildstream.testing import cli_integration as cli  # pylint: disable=unused-import
-from buildstream.testing.integration import assert_contains
-from buildstream.testing._utils.site import IS_LINUX
+from buildstream._testing import cli_integration as cli  # pylint: disable=unused-import
+from buildstream._testing.integration import assert_contains
+from buildstream._testing._utils.site import IS_LINUX
 
 
 pytestmark = pytest.mark.integration
diff --git a/tests/examples/integration-commands.py b/tests/examples/integration-commands.py
index ad270d0..2639406 100644
--- a/tests/examples/integration-commands.py
+++ b/tests/examples/integration-commands.py
@@ -4,8 +4,8 @@
 import os
 import pytest
 
-from buildstream.testing import cli_integration as cli  # pylint: disable=unused-import
-from buildstream.testing._utils.site import IS_LINUX, MACHINE_ARCH, HAVE_SANDBOX
+from buildstream._testing import cli_integration as cli  # pylint: disable=unused-import
+from buildstream._testing._utils.site import IS_LINUX, MACHINE_ARCH, HAVE_SANDBOX
 
 
 pytestmark = pytest.mark.integration
diff --git a/tests/examples/junctions.py b/tests/examples/junctions.py
index 1bfc9cd..06c3da9 100644
--- a/tests/examples/junctions.py
+++ b/tests/examples/junctions.py
@@ -4,8 +4,8 @@
 import os
 import pytest
 
-from buildstream.testing import cli_integration as cli  # pylint: disable=unused-import
-from buildstream.testing._utils.site import IS_LINUX, MACHINE_ARCH, HAVE_SANDBOX
+from buildstream._testing import cli_integration as cli  # pylint: disable=unused-import
+from buildstream._testing._utils.site import IS_LINUX, MACHINE_ARCH, HAVE_SANDBOX
 
 pytestmark = pytest.mark.integration
 
diff --git a/tests/examples/running-commands.py b/tests/examples/running-commands.py
index 9f60b72..e720540 100644
--- a/tests/examples/running-commands.py
+++ b/tests/examples/running-commands.py
@@ -4,8 +4,8 @@
 import os
 import pytest
 
-from buildstream.testing import cli_integration as cli  # pylint: disable=unused-import
-from buildstream.testing._utils.site import IS_LINUX, MACHINE_ARCH, HAVE_SANDBOX
+from buildstream._testing import cli_integration as cli  # pylint: disable=unused-import
+from buildstream._testing._utils.site import IS_LINUX, MACHINE_ARCH, HAVE_SANDBOX
 
 
 pytestmark = pytest.mark.integration
diff --git a/tests/format/assertion.py b/tests/format/assertion.py
index 3ca5072..a83e545 100644
--- a/tests/format/assertion.py
+++ b/tests/format/assertion.py
@@ -4,7 +4,7 @@
 import os
 import pytest
 from buildstream.exceptions import ErrorDomain, LoadErrorReason
-from buildstream.testing.runcli import cli  # pylint: disable=unused-import
+from buildstream._testing.runcli import cli  # pylint: disable=unused-import
 
 # Project directory
 DATA_DIR = os.path.join(os.path.dirname(os.path.realpath(__file__)), "assertion")
diff --git a/tests/format/dependencies.py b/tests/format/dependencies.py
index 7847506..e919c97 100644
--- a/tests/format/dependencies.py
+++ b/tests/format/dependencies.py
@@ -5,7 +5,7 @@ import os
 import pytest
 
 from buildstream.exceptions import ErrorDomain, LoadErrorReason
-from buildstream.testing import cli  # pylint: disable=unused-import
+from buildstream._testing import cli  # pylint: disable=unused-import
 
 DATA_DIR = os.path.dirname(os.path.realpath(__file__))
 
diff --git a/tests/format/elementnames.py b/tests/format/elementnames.py
index 2e34952..cc3d2e1 100644
--- a/tests/format/elementnames.py
+++ b/tests/format/elementnames.py
@@ -5,7 +5,7 @@ import os
 import pytest
 
 from buildstream.exceptions import ErrorDomain, LoadErrorReason
-from buildstream.testing import cli  # pylint: disable=unused-import
+from buildstream._testing import cli  # pylint: disable=unused-import
 
 DATA_DIR = os.path.dirname(os.path.realpath(__file__))
 
diff --git a/tests/format/include.py b/tests/format/include.py
index 11659d4..6842d24 100644
--- a/tests/format/include.py
+++ b/tests/format/include.py
@@ -6,8 +6,8 @@ import textwrap
 import pytest
 from buildstream import _yaml
 from buildstream.exceptions import ErrorDomain, LoadErrorReason
-from buildstream.testing import cli  # pylint: disable=unused-import
-from buildstream.testing import create_repo
+from buildstream._testing import cli  # pylint: disable=unused-import
+from buildstream._testing import create_repo
 from tests.testutils import generate_junction
 
 
diff --git a/tests/format/invalid_keys.py b/tests/format/invalid_keys.py
index b2bab19..7e9d00f 100644
--- a/tests/format/invalid_keys.py
+++ b/tests/format/invalid_keys.py
@@ -4,7 +4,7 @@
 import os
 import pytest
 from buildstream.exceptions import ErrorDomain, LoadErrorReason
-from buildstream.testing.runcli import cli  # pylint: disable=unused-import
+from buildstream._testing.runcli import cli  # pylint: disable=unused-import
 
 # Project directory
 DATA_DIR = os.path.join(os.path.dirname(os.path.realpath(__file__)), "invalid-keys")
diff --git a/tests/format/junctions.py b/tests/format/junctions.py
index 5c65a55..a6b5b35 100644
--- a/tests/format/junctions.py
+++ b/tests/format/junctions.py
@@ -7,8 +7,8 @@ import pytest
 
 from buildstream import _yaml
 from buildstream.exceptions import ErrorDomain, LoadErrorReason
-from buildstream.testing import cli  # pylint: disable=unused-import
-from buildstream.testing import create_repo
+from buildstream._testing import cli  # pylint: disable=unused-import
+from buildstream._testing import create_repo
 
 
 DATA_DIR = os.path.join(os.path.dirname(os.path.realpath(__file__)), "junctions",)
diff --git a/tests/format/link.py b/tests/format/link.py
index 88b5569..8aa80bb 100644
--- a/tests/format/link.py
+++ b/tests/format/link.py
@@ -6,7 +6,7 @@ import os
 import pytest
 
 from buildstream import _yaml
-from buildstream.testing import cli  # pylint: disable=unused-import
+from buildstream._testing import cli  # pylint: disable=unused-import
 from buildstream.exceptions import ErrorDomain, LoadErrorReason
 
 
diff --git a/tests/format/listdirectiveerrors.py b/tests/format/listdirectiveerrors.py
index 77d9b3f..70ebfb5 100644
--- a/tests/format/listdirectiveerrors.py
+++ b/tests/format/listdirectiveerrors.py
@@ -4,7 +4,7 @@
 import os
 import pytest
 from buildstream.exceptions import ErrorDomain, LoadErrorReason
-from buildstream.testing.runcli import cli  # pylint: disable=unused-import
+from buildstream._testing.runcli import cli  # pylint: disable=unused-import
 
 # Project directory
 DATA_DIR = os.path.dirname(os.path.realpath(__file__))
diff --git a/tests/format/option-list-directive.py b/tests/format/option-list-directive.py
index 2df5b6f..27704f3 100644
--- a/tests/format/option-list-directive.py
+++ b/tests/format/option-list-directive.py
@@ -3,7 +3,7 @@
 
 import os
 import pytest
-from buildstream.testing.runcli import cli  # pylint: disable=unused-import
+from buildstream._testing.runcli import cli  # pylint: disable=unused-import
 
 # Project directory
 DATA_DIR = os.path.dirname(os.path.realpath(__file__))
diff --git a/tests/format/optionarch.py b/tests/format/optionarch.py
index 4f7084b..34ad7d4 100644
--- a/tests/format/optionarch.py
+++ b/tests/format/optionarch.py
@@ -7,7 +7,7 @@ import pytest
 
 from buildstream import _yaml
 from buildstream.exceptions import ErrorDomain, LoadErrorReason
-from buildstream.testing.runcli import cli  # pylint: disable=unused-import
+from buildstream._testing.runcli import cli  # pylint: disable=unused-import
 
 from tests.testutils import override_platform_uname
 
diff --git a/tests/format/optionbool.py b/tests/format/optionbool.py
index 6f56249..8f52e02 100644
--- a/tests/format/optionbool.py
+++ b/tests/format/optionbool.py
@@ -5,7 +5,7 @@ import os
 import pytest
 from buildstream import _yaml
 from buildstream.exceptions import ErrorDomain, LoadErrorReason
-from buildstream.testing.runcli import cli  # pylint: disable=unused-import
+from buildstream._testing.runcli import cli  # pylint: disable=unused-import
 
 # Project directory
 DATA_DIR = os.path.dirname(os.path.realpath(__file__))
diff --git a/tests/format/optioneltmask.py b/tests/format/optioneltmask.py
index c5b32d1..eb1ae95 100644
--- a/tests/format/optioneltmask.py
+++ b/tests/format/optioneltmask.py
@@ -5,7 +5,7 @@ import os
 import pytest
 from buildstream import _yaml
 from buildstream.exceptions import ErrorDomain, LoadErrorReason
-from buildstream.testing.runcli import cli  # pylint: disable=unused-import
+from buildstream._testing.runcli import cli  # pylint: disable=unused-import
 
 # Project directory
 DATA_DIR = os.path.dirname(os.path.realpath(__file__))
diff --git a/tests/format/optionenum.py b/tests/format/optionenum.py
index b525347..716dc03 100644
--- a/tests/format/optionenum.py
+++ b/tests/format/optionenum.py
@@ -5,7 +5,7 @@ import os
 import pytest
 from buildstream import _yaml
 from buildstream.exceptions import ErrorDomain, LoadErrorReason
-from buildstream.testing.runcli import cli  # pylint: disable=unused-import
+from buildstream._testing.runcli import cli  # pylint: disable=unused-import
 
 # Project directory
 DATA_DIR = os.path.dirname(os.path.realpath(__file__))
diff --git a/tests/format/optionexports.py b/tests/format/optionexports.py
index 4f95dc1..1cbb5bf 100644
--- a/tests/format/optionexports.py
+++ b/tests/format/optionexports.py
@@ -4,7 +4,7 @@
 import os
 import pytest
 from buildstream import _yaml
-from buildstream.testing.runcli import cli  # pylint: disable=unused-import
+from buildstream._testing.runcli import cli  # pylint: disable=unused-import
 
 # Project directory
 DATA_DIR = os.path.dirname(os.path.realpath(__file__))
diff --git a/tests/format/optionflags.py b/tests/format/optionflags.py
index a3c310f..bb085d8 100644
--- a/tests/format/optionflags.py
+++ b/tests/format/optionflags.py
@@ -5,7 +5,7 @@ import os
 import pytest
 from buildstream import _yaml
 from buildstream.exceptions import ErrorDomain, LoadErrorReason
-from buildstream.testing.runcli import cli  # pylint: disable=unused-import
+from buildstream._testing.runcli import cli  # pylint: disable=unused-import
 
 # Project directory
 DATA_DIR = os.path.dirname(os.path.realpath(__file__))
diff --git a/tests/format/optionos.py b/tests/format/optionos.py
index 46ec22d..f998970 100644
--- a/tests/format/optionos.py
+++ b/tests/format/optionos.py
@@ -7,7 +7,7 @@ import pytest
 
 from buildstream import _yaml
 from buildstream.exceptions import ErrorDomain, LoadErrorReason
-from buildstream.testing.runcli import cli  # pylint: disable=unused-import
+from buildstream._testing.runcli import cli  # pylint: disable=unused-import
 
 from tests.testutils import override_platform_uname
 
diff --git a/tests/format/optionoverrides.py b/tests/format/optionoverrides.py
index ba12e75..6e6394b 100644
--- a/tests/format/optionoverrides.py
+++ b/tests/format/optionoverrides.py
@@ -4,7 +4,7 @@
 import os
 import pytest
 from buildstream import _yaml
-from buildstream.testing.runcli import cli  # pylint: disable=unused-import
+from buildstream._testing.runcli import cli  # pylint: disable=unused-import
 
 # Project directory
 DATA_DIR = os.path.dirname(os.path.realpath(__file__))
diff --git a/tests/format/options.py b/tests/format/options.py
index 4af3495..83e1823 100644
--- a/tests/format/options.py
+++ b/tests/format/options.py
@@ -5,7 +5,7 @@ import os
 import pytest
 from buildstream import _yaml
 from buildstream.exceptions import ErrorDomain, LoadErrorReason
-from buildstream.testing.runcli import cli  # pylint: disable=unused-import
+from buildstream._testing.runcli import cli  # pylint: disable=unused-import
 
 # Project directory
 DATA_DIR = os.path.join(os.path.dirname(os.path.realpath(__file__)), "options")
diff --git a/tests/format/project.py b/tests/format/project.py
index b5b75d0..17b6290 100644
--- a/tests/format/project.py
+++ b/tests/format/project.py
@@ -5,7 +5,7 @@ import os
 import pytest
 from buildstream import _yaml
 from buildstream.exceptions import ErrorDomain, LoadErrorReason
-from buildstream.testing import cli  # pylint: disable=unused-import
+from buildstream._testing import cli  # pylint: disable=unused-import
 
 from tests.testutils import filetypegenerator
 
diff --git a/tests/format/projectoverrides.py b/tests/format/projectoverrides.py
index 16aad2c..8c8f301 100644
--- a/tests/format/projectoverrides.py
+++ b/tests/format/projectoverrides.py
@@ -4,7 +4,7 @@
 import os
 import pytest
 from buildstream import _yaml
-from buildstream.testing.runcli import cli  # pylint: disable=unused-import
+from buildstream._testing.runcli import cli  # pylint: disable=unused-import
 
 # Project directory
 DATA_DIR = os.path.join(os.path.dirname(os.path.realpath(__file__)), "project-overrides")
diff --git a/tests/format/stack.py b/tests/format/stack.py
index b014e9b..0c07439 100644
--- a/tests/format/stack.py
+++ b/tests/format/stack.py
@@ -5,7 +5,7 @@ import os
 import pytest
 
 from buildstream.exceptions import ErrorDomain
-from buildstream.testing import cli  # pylint: disable=unused-import
+from buildstream._testing import cli  # pylint: disable=unused-import
 
 DATA_DIR = os.path.join(os.path.dirname(os.path.realpath(__file__)), "stack")
 
diff --git a/tests/format/substitutions.py b/tests/format/substitutions.py
index 265f13e..acf0c3e 100644
--- a/tests/format/substitutions.py
+++ b/tests/format/substitutions.py
@@ -3,7 +3,7 @@
 
 import os
 import pytest
-from buildstream.testing import cli  # pylint: disable=unused-import
+from buildstream._testing import cli  # pylint: disable=unused-import
 
 
 DATA_DIR = os.path.join(os.path.dirname(os.path.realpath(__file__)), "project", "default")
diff --git a/tests/format/userconfig.py b/tests/format/userconfig.py
index 134327b..6d401d0 100644
--- a/tests/format/userconfig.py
+++ b/tests/format/userconfig.py
@@ -6,7 +6,7 @@ import os
 import pytest
 
 from buildstream.exceptions import ErrorDomain, LoadErrorReason
-from buildstream.testing.runcli import cli  # pylint: disable=unused-import
+from buildstream._testing.runcli import cli  # pylint: disable=unused-import
 
 # Project directory
 DATA_DIR = os.path.join(os.path.dirname(os.path.realpath(__file__)), "project")
diff --git a/tests/format/variables.py b/tests/format/variables.py
index 0b30c66..6e8b397 100644
--- a/tests/format/variables.py
+++ b/tests/format/variables.py
@@ -8,7 +8,7 @@ import pytest
 
 from buildstream import _yaml
 from buildstream.exceptions import ErrorDomain, LoadErrorReason
-from buildstream.testing.runcli import cli  # pylint: disable=unused-import
+from buildstream._testing.runcli import cli  # pylint: disable=unused-import
 
 
 # Project directory
diff --git a/tests/frontend/artifact_checkout.py b/tests/frontend/artifact_checkout.py
index 962b31f..5585f18 100644
--- a/tests/frontend/artifact_checkout.py
+++ b/tests/frontend/artifact_checkout.py
@@ -6,7 +6,7 @@ import shutil
 
 import pytest
 
-from buildstream.testing import cli  # pylint: disable=unused-import
+from buildstream._testing import cli  # pylint: disable=unused-import
 from buildstream.exceptions import ErrorDomain
 
 from tests.testutils import create_artifact_share
diff --git a/tests/frontend/artifact_delete.py b/tests/frontend/artifact_delete.py
index 7975aac..f881e7a 100644
--- a/tests/frontend/artifact_delete.py
+++ b/tests/frontend/artifact_delete.py
@@ -22,7 +22,7 @@ import pytest
 
 from buildstream.element import _get_normal_name
 from buildstream.exceptions import ErrorDomain
-from buildstream.testing import cli  # pylint: disable=unused-import
+from buildstream._testing import cli  # pylint: disable=unused-import
 from tests.testutils import create_artifact_share
 
 
diff --git a/tests/frontend/artifact_list_contents.py b/tests/frontend/artifact_list_contents.py
index ea59a1e..5cbf341 100644
--- a/tests/frontend/artifact_list_contents.py
+++ b/tests/frontend/artifact_list_contents.py
@@ -20,7 +20,7 @@
 import os
 import pytest
 
-from buildstream.testing import cli  # pylint: disable=unused-import
+from buildstream._testing import cli  # pylint: disable=unused-import
 from buildstream.exceptions import ErrorDomain
 
 
diff --git a/tests/frontend/artifact_log.py b/tests/frontend/artifact_log.py
index 06368b4..e7d60ee 100644
--- a/tests/frontend/artifact_log.py
+++ b/tests/frontend/artifact_log.py
@@ -21,7 +21,7 @@ import os
 import re
 import pytest
 
-from buildstream.testing import cli  # pylint: disable=unused-import
+from buildstream._testing import cli  # pylint: disable=unused-import
 
 
 # Project directory
diff --git a/tests/frontend/artifact_pull.py b/tests/frontend/artifact_pull.py
index afd9f62..01f8714 100644
--- a/tests/frontend/artifact_pull.py
+++ b/tests/frontend/artifact_pull.py
@@ -6,7 +6,7 @@ import shutil
 
 import pytest
 
-from buildstream.testing import cli  # pylint: disable=unused-import
+from buildstream._testing import cli  # pylint: disable=unused-import
 from buildstream.exceptions import ErrorDomain
 
 from tests.testutils import create_artifact_share
diff --git a/tests/frontend/artifact_show.py b/tests/frontend/artifact_show.py
index b3e2e40..008803a 100644
--- a/tests/frontend/artifact_show.py
+++ b/tests/frontend/artifact_show.py
@@ -21,7 +21,7 @@ import os
 import pytest
 
 from buildstream.exceptions import ErrorDomain
-from buildstream.testing import cli  # pylint: disable=unused-import
+from buildstream._testing import cli  # pylint: disable=unused-import
 from tests.testutils import create_artifact_share
 
 
diff --git a/tests/frontend/buildcheckout.py b/tests/frontend/buildcheckout.py
index b25e313..b76a69b 100644
--- a/tests/frontend/buildcheckout.py
+++ b/tests/frontend/buildcheckout.py
@@ -8,9 +8,9 @@ import re
 
 import pytest
 
-from buildstream.testing import cli  # pylint: disable=unused-import
-from buildstream.testing import create_repo
-from buildstream.testing._utils.site import CASD_SEPARATE_USER
+from buildstream._testing import cli  # pylint: disable=unused-import
+from buildstream._testing import create_repo
+from buildstream._testing._utils.site import CASD_SEPARATE_USER
 from buildstream import _yaml
 from buildstream.exceptions import ErrorDomain, LoadErrorReason
 from buildstream import utils
diff --git a/tests/frontend/completions.py b/tests/frontend/completions.py
index a96580d..a2a8951 100644
--- a/tests/frontend/completions.py
+++ b/tests/frontend/completions.py
@@ -3,7 +3,7 @@
 
 import os
 import pytest
-from buildstream.testing import cli  # pylint: disable=unused-import
+from buildstream._testing import cli  # pylint: disable=unused-import
 
 # Project directory
 DATA_DIR = os.path.join(os.path.dirname(os.path.realpath(__file__)), "completions")
diff --git a/tests/frontend/compose_splits.py b/tests/frontend/compose_splits.py
index d333b03..6f509d4 100644
--- a/tests/frontend/compose_splits.py
+++ b/tests/frontend/compose_splits.py
@@ -3,7 +3,7 @@
 
 import os
 import pytest
-from buildstream.testing.runcli import cli  # pylint: disable=unused-import
+from buildstream._testing.runcli import cli  # pylint: disable=unused-import
 
 # Project directory
 DATA_DIR = os.path.join(os.path.dirname(os.path.realpath(__file__)), "project",)
diff --git a/tests/frontend/configurable_warnings.py b/tests/frontend/configurable_warnings.py
index 53409a5..98339e2 100644
--- a/tests/frontend/configurable_warnings.py
+++ b/tests/frontend/configurable_warnings.py
@@ -8,7 +8,7 @@ import pytest
 from buildstream.plugin import CoreWarnings
 from buildstream.exceptions import ErrorDomain
 from buildstream import _yaml
-from buildstream.testing.runcli import cli  # pylint: disable=unused-import
+from buildstream._testing.runcli import cli  # pylint: disable=unused-import
 
 TOP_DIR = os.path.join(os.path.dirname(os.path.realpath(__file__)), "configuredwarning")
 
diff --git a/tests/frontend/cross_junction_workspace.py b/tests/frontend/cross_junction_workspace.py
index 0972f94..c0a728b 100644
--- a/tests/frontend/cross_junction_workspace.py
+++ b/tests/frontend/cross_junction_workspace.py
@@ -2,8 +2,8 @@
 # pylint: disable=redefined-outer-name
 
 import os
-from buildstream.testing import cli  # pylint: disable=unused-import
-from buildstream.testing import create_repo
+from buildstream._testing import cli  # pylint: disable=unused-import
+from buildstream._testing import create_repo
 from buildstream import _yaml
 
 
diff --git a/tests/frontend/default_target.py b/tests/frontend/default_target.py
index a10133d..116536f 100644
--- a/tests/frontend/default_target.py
+++ b/tests/frontend/default_target.py
@@ -6,7 +6,7 @@ import os
 import pytest
 
 from buildstream import _yaml
-from buildstream.testing import cli, create_repo  # pylint: disable=unused-import
+from buildstream._testing import cli, create_repo  # pylint: disable=unused-import
 from tests.testutils import create_artifact_share
 
 # project directory
diff --git a/tests/frontend/fetch.py b/tests/frontend/fetch.py
index e18c129..98d91c4 100644
--- a/tests/frontend/fetch.py
+++ b/tests/frontend/fetch.py
@@ -4,7 +4,7 @@
 import os
 import pytest
 
-from buildstream.testing import cli  # pylint: disable=unused-import
+from buildstream._testing import cli  # pylint: disable=unused-import
 from buildstream import _yaml
 from buildstream.exceptions import ErrorDomain, LoadErrorReason
 
diff --git a/tests/frontend/help.py b/tests/frontend/help.py
index f95cf02..729ab08 100644
--- a/tests/frontend/help.py
+++ b/tests/frontend/help.py
@@ -2,7 +2,7 @@
 # pylint: disable=redefined-outer-name
 
 import pytest
-from buildstream.testing.runcli import cli  # pylint: disable=unused-import
+from buildstream._testing.runcli import cli  # pylint: disable=unused-import
 
 
 def assert_help(cli_output):
diff --git a/tests/frontend/init.py b/tests/frontend/init.py
index c206fb0..152922e 100644
--- a/tests/frontend/init.py
+++ b/tests/frontend/init.py
@@ -3,7 +3,7 @@
 
 import os
 import pytest
-from buildstream.testing import cli  # pylint: disable=unused-import
+from buildstream._testing import cli  # pylint: disable=unused-import
 
 from buildstream import _yaml
 from buildstream import utils
diff --git a/tests/frontend/large_directory.py b/tests/frontend/large_directory.py
index d79fa3d..9c80715 100644
--- a/tests/frontend/large_directory.py
+++ b/tests/frontend/large_directory.py
@@ -23,7 +23,7 @@ import pytest
 
 import grpc
 
-from buildstream.testing import cli  # pylint: disable=unused-import
+from buildstream._testing import cli  # pylint: disable=unused-import
 from tests.testutils import create_artifact_share, assert_shared
 
 
diff --git a/tests/frontend/logging.py b/tests/frontend/logging.py
index 6cbbee7..1e5ecc1 100644
--- a/tests/frontend/logging.py
+++ b/tests/frontend/logging.py
@@ -6,11 +6,11 @@ import re
 
 import pytest
 
-from buildstream.testing import create_repo
+from buildstream._testing import create_repo
 
 from buildstream import _yaml
 from buildstream.exceptions import ErrorDomain
-from buildstream.testing import cli  # pylint: disable=unused-import
+from buildstream._testing import cli  # pylint: disable=unused-import
 
 # Project directory
 DATA_DIR = os.path.dirname(os.path.realpath(__file__))
diff --git a/tests/frontend/mirror.py b/tests/frontend/mirror.py
index e13c88a..c809c72 100644
--- a/tests/frontend/mirror.py
+++ b/tests/frontend/mirror.py
@@ -6,8 +6,8 @@ import pytest
 
 from buildstream import _yaml
 from buildstream.exceptions import ErrorDomain
-from buildstream.testing import create_repo
-from buildstream.testing import cli  # pylint: disable=unused-import
+from buildstream._testing import create_repo
+from buildstream._testing import cli  # pylint: disable=unused-import
 
 
 # Project directory
diff --git a/tests/frontend/order.py b/tests/frontend/order.py
index b57f373..f61660d 100644
--- a/tests/frontend/order.py
+++ b/tests/frontend/order.py
@@ -4,8 +4,8 @@
 import os
 
 import pytest
-from buildstream.testing import create_repo
-from buildstream.testing import cli  # pylint: disable=unused-import
+from buildstream._testing import create_repo
+from buildstream._testing import cli  # pylint: disable=unused-import
 from buildstream import _yaml
 
 # Project directory
diff --git a/tests/frontend/overlaps.py b/tests/frontend/overlaps.py
index 7a9925e..7a62fbe 100644
--- a/tests/frontend/overlaps.py
+++ b/tests/frontend/overlaps.py
@@ -3,7 +3,7 @@
 
 import os
 import pytest
-from buildstream.testing.runcli import cli  # pylint: disable=unused-import
+from buildstream._testing.runcli import cli  # pylint: disable=unused-import
 from buildstream.exceptions import ErrorDomain, LoadErrorReason
 from buildstream import _yaml
 from buildstream import CoreWarnings, OverlapAction
diff --git a/tests/frontend/progress.py b/tests/frontend/progress.py
index bb1302e..70d74f4 100644
--- a/tests/frontend/progress.py
+++ b/tests/frontend/progress.py
@@ -4,7 +4,7 @@
 import os
 import pytest
 
-from buildstream.testing import cli  # pylint: disable=unused-import
+from buildstream._testing import cli  # pylint: disable=unused-import
 from buildstream import _yaml
 from buildstream.exceptions import ErrorDomain, LoadErrorReason
 
diff --git a/tests/frontend/pull.py b/tests/frontend/pull.py
index 93168cb..17c8b4c 100644
--- a/tests/frontend/pull.py
+++ b/tests/frontend/pull.py
@@ -6,8 +6,8 @@ import shutil
 import stat
 import pytest
 from buildstream import utils, _yaml
-from buildstream.testing import cli  # pylint: disable=unused-import
-from buildstream.testing import create_repo
+from buildstream._testing import cli  # pylint: disable=unused-import
+from buildstream._testing import create_repo
 from tests.testutils import (
     create_artifact_share,
     create_split_share,
diff --git a/tests/frontend/push.py b/tests/frontend/push.py
index b353b8e..adc7b81 100644
--- a/tests/frontend/push.py
+++ b/tests/frontend/push.py
@@ -27,8 +27,8 @@ import shutil
 import pytest
 
 from buildstream.exceptions import ErrorDomain
-from buildstream.testing import cli, generate_project, Cli  # pylint: disable=unused-import
-from buildstream.testing._utils.site import have_subsecond_mtime
+from buildstream._testing import cli, generate_project, Cli  # pylint: disable=unused-import
+from buildstream._testing._utils.site import have_subsecond_mtime
 from tests.testutils import (
     create_artifact_share,
     create_element_size,
diff --git a/tests/frontend/rebuild.py b/tests/frontend/rebuild.py
index a69c0e5..5bfa92e 100644
--- a/tests/frontend/rebuild.py
+++ b/tests/frontend/rebuild.py
@@ -3,7 +3,7 @@
 
 import os
 import pytest
-from buildstream.testing import cli  # pylint: disable=unused-import
+from buildstream._testing import cli  # pylint: disable=unused-import
 
 # Project directory
 DATA_DIR = os.path.join(os.path.dirname(os.path.realpath(__file__)), "project",)
diff --git a/tests/frontend/remote-caches.py b/tests/frontend/remote-caches.py
index ffec6c7..24e1ae9 100644
--- a/tests/frontend/remote-caches.py
+++ b/tests/frontend/remote-caches.py
@@ -22,7 +22,7 @@ import os
 import shutil
 import pytest
 
-from buildstream.testing import cli  # pylint: disable=unused-import
+from buildstream._testing import cli  # pylint: disable=unused-import
 from buildstream import _yaml
 
 from tests.testutils import create_artifact_share, create_element_size
diff --git a/tests/frontend/show.py b/tests/frontend/show.py
index baca10e..fc8bd35 100644
--- a/tests/frontend/show.py
+++ b/tests/frontend/show.py
@@ -5,7 +5,7 @@ import os
 import sys
 import shutil
 import pytest
-from buildstream.testing import cli  # pylint: disable=unused-import
+from buildstream._testing import cli  # pylint: disable=unused-import
 from buildstream import _yaml
 from buildstream.exceptions import ErrorDomain, LoadErrorReason
 from buildstream.types import CoreWarnings
diff --git a/tests/frontend/source_checkout.py b/tests/frontend/source_checkout.py
index 263f54c..18d7c51 100644
--- a/tests/frontend/source_checkout.py
+++ b/tests/frontend/source_checkout.py
@@ -6,7 +6,7 @@ import tarfile
 
 import pytest
 
-from buildstream.testing import cli  # pylint: disable=unused-import
+from buildstream._testing import cli  # pylint: disable=unused-import
 
 from buildstream import utils, _yaml
 
diff --git a/tests/frontend/track.py b/tests/frontend/track.py
index 3ed9f50..c870816 100644
--- a/tests/frontend/track.py
+++ b/tests/frontend/track.py
@@ -6,9 +6,9 @@ import os
 import re
 import pytest
 
-from buildstream.testing import create_repo, generate_project
-from buildstream.testing import cli  # pylint: disable=unused-import
-from buildstream.testing._utils.site import have_subsecond_mtime
+from buildstream._testing import create_repo, generate_project
+from buildstream._testing import cli  # pylint: disable=unused-import
+from buildstream._testing._utils.site import have_subsecond_mtime
 from buildstream.exceptions import ErrorDomain, LoadErrorReason
 from buildstream import _yaml
 from tests.testutils import generate_junction
diff --git a/tests/frontend/version.py b/tests/frontend/version.py
index 279a517..8de4a71 100644
--- a/tests/frontend/version.py
+++ b/tests/frontend/version.py
@@ -1,7 +1,7 @@
 # Pylint doesn't play well with fixtures and dependency injection from pytest
 # pylint: disable=redefined-outer-name
 
-from buildstream.testing.runcli import cli  # pylint: disable=unused-import
+from buildstream._testing.runcli import cli  # pylint: disable=unused-import
 
 
 # For utils.get_bst_version()
diff --git a/tests/frontend/workspace.py b/tests/frontend/workspace.py
index 928068d..feec934 100644
--- a/tests/frontend/workspace.py
+++ b/tests/frontend/workspace.py
@@ -33,8 +33,8 @@ import tempfile
 
 import pytest
 
-from buildstream.testing import create_repo, ALL_REPO_KINDS
-from buildstream.testing import cli  # pylint: disable=unused-import
+from buildstream._testing import create_repo, ALL_REPO_KINDS
+from buildstream._testing import cli  # pylint: disable=unused-import
 from buildstream import _yaml
 from buildstream.exceptions import ErrorDomain, LoadErrorReason
 from buildstream._workspaces import BST_WORKSPACE_FORMAT_VERSION
diff --git a/tests/integration/artifact.py b/tests/integration/artifact.py
index 191c7eb..6e8fd2e 100644
--- a/tests/integration/artifact.py
+++ b/tests/integration/artifact.py
@@ -25,8 +25,8 @@ import shutil
 
 import pytest
 
-from buildstream.testing import cli_integration as cli  # pylint: disable=unused-import
-from buildstream.testing._utils.site import HAVE_SANDBOX
+from buildstream._testing import cli_integration as cli  # pylint: disable=unused-import
+from buildstream._testing._utils.site import HAVE_SANDBOX
 
 from tests.testutils import create_artifact_share
 
diff --git a/tests/integration/autotools.py b/tests/integration/autotools.py
index d1ab82e..ac017ff8 100644
--- a/tests/integration/autotools.py
+++ b/tests/integration/autotools.py
@@ -4,9 +4,9 @@
 import os
 import pytest
 
-from buildstream.testing import cli_integration as cli  # pylint: disable=unused-import
-from buildstream.testing.integration import assert_contains
-from buildstream.testing._utils.site import HAVE_SANDBOX
+from buildstream._testing import cli_integration as cli  # pylint: disable=unused-import
+from buildstream._testing.integration import assert_contains
+from buildstream._testing._utils.site import HAVE_SANDBOX
 
 
 pytestmark = pytest.mark.integration
diff --git a/tests/integration/build-uid.py b/tests/integration/build-uid.py
index a0cc20d..0b0835e 100644
--- a/tests/integration/build-uid.py
+++ b/tests/integration/build-uid.py
@@ -4,8 +4,8 @@
 import os
 import pytest
 
-from buildstream.testing import cli_integration as cli  # pylint: disable=unused-import
-from buildstream.testing._utils.site import HAVE_SANDBOX, BUILDBOX_RUN
+from buildstream._testing import cli_integration as cli  # pylint: disable=unused-import
+from buildstream._testing._utils.site import HAVE_SANDBOX, BUILDBOX_RUN
 
 
 pytestmark = pytest.mark.integration
diff --git a/tests/integration/cachedfail.py b/tests/integration/cachedfail.py
index 2b40042..7c342ee 100644
--- a/tests/integration/cachedfail.py
+++ b/tests/integration/cachedfail.py
@@ -21,8 +21,8 @@ import pytest
 
 from buildstream import utils, _yaml
 from buildstream.exceptions import ErrorDomain
-from buildstream.testing import cli_integration as cli  # pylint: disable=unused-import
-from buildstream.testing._utils.site import HAVE_SANDBOX
+from buildstream._testing import cli_integration as cli  # pylint: disable=unused-import
+from buildstream._testing._utils.site import HAVE_SANDBOX
 
 from tests.testutils import create_artifact_share
 
diff --git a/tests/integration/compose-symlinks.py b/tests/integration/compose-symlinks.py
index 7b807d1..51cd9fc 100644
--- a/tests/integration/compose-symlinks.py
+++ b/tests/integration/compose-symlinks.py
@@ -4,7 +4,7 @@
 import os
 import pytest
 
-from buildstream.testing import cli_integration as cli  # pylint: disable=unused-import
+from buildstream._testing import cli_integration as cli  # pylint: disable=unused-import
 
 
 pytestmark = pytest.mark.integration
diff --git a/tests/integration/compose.py b/tests/integration/compose.py
index f08f2e8..2211dc1 100644
--- a/tests/integration/compose.py
+++ b/tests/integration/compose.py
@@ -6,9 +6,9 @@ import pytest
 
 from buildstream import _yaml
 
-from buildstream.testing import cli_integration as cli  # pylint: disable=unused-import
-from buildstream.testing.integration import walk_dir
-from buildstream.testing._utils.site import HAVE_SANDBOX, BUILDBOX_RUN
+from buildstream._testing import cli_integration as cli  # pylint: disable=unused-import
+from buildstream._testing.integration import walk_dir
+from buildstream._testing._utils.site import HAVE_SANDBOX, BUILDBOX_RUN
 
 
 pytestmark = pytest.mark.integration
diff --git a/tests/integration/filter.py b/tests/integration/filter.py
index f8d2aff..12b9862 100644
--- a/tests/integration/filter.py
+++ b/tests/integration/filter.py
@@ -5,9 +5,9 @@ import os
 import shutil
 import pytest
 
-from buildstream.testing import cli  # pylint: disable=unused-import
-from buildstream.testing.integration import assert_contains
-from buildstream.testing._utils.site import HAVE_SANDBOX, BUILDBOX_RUN
+from buildstream._testing import cli  # pylint: disable=unused-import
+from buildstream._testing.integration import assert_contains
+from buildstream._testing._utils.site import HAVE_SANDBOX, BUILDBOX_RUN
 
 
 pytestmark = pytest.mark.integration
diff --git a/tests/integration/import.py b/tests/integration/import.py
index f7510e2..55142a8 100644
--- a/tests/integration/import.py
+++ b/tests/integration/import.py
@@ -6,8 +6,8 @@ import pytest
 
 from buildstream import _yaml
 
-from buildstream.testing import cli_integration as cli  # pylint: disable=unused-import
-from buildstream.testing.integration import walk_dir
+from buildstream._testing import cli_integration as cli  # pylint: disable=unused-import
+from buildstream._testing.integration import walk_dir
 
 
 pytestmark = pytest.mark.integration
diff --git a/tests/integration/interactive_build.py b/tests/integration/interactive_build.py
index 285cb86..f0c41db 100644
--- a/tests/integration/interactive_build.py
+++ b/tests/integration/interactive_build.py
@@ -5,8 +5,8 @@ import os
 import pexpect
 import pytest
 
-from buildstream.testing import runcli
-from buildstream.testing._utils.site import HAVE_SANDBOX
+from buildstream._testing import runcli
+from buildstream._testing._utils.site import HAVE_SANDBOX
 from tests.testutils.constants import PEXPECT_TIMEOUT_SHORT, PEXPECT_TIMEOUT_LONG
 
 
diff --git a/tests/integration/manual.py b/tests/integration/manual.py
index c538be9..a7a639a 100644
--- a/tests/integration/manual.py
+++ b/tests/integration/manual.py
@@ -7,8 +7,8 @@ import pytest
 
 from buildstream import _yaml
 
-from buildstream.testing import cli_integration as cli  # pylint: disable=unused-import
-from buildstream.testing._utils.site import HAVE_SANDBOX
+from buildstream._testing import cli_integration as cli  # pylint: disable=unused-import
+from buildstream._testing._utils.site import HAVE_SANDBOX
 
 
 pytestmark = pytest.mark.integration
diff --git a/tests/integration/messages.py b/tests/integration/messages.py
index 96e4b4f..9fc7059 100644
--- a/tests/integration/messages.py
+++ b/tests/integration/messages.py
@@ -24,8 +24,8 @@ import pytest
 
 from buildstream import _yaml
 from buildstream.exceptions import ErrorDomain
-from buildstream.testing import cli_integration as cli  # pylint: disable=unused-import
-from buildstream.testing._utils.site import HAVE_SANDBOX
+from buildstream._testing import cli_integration as cli  # pylint: disable=unused-import
+from buildstream._testing._utils.site import HAVE_SANDBOX
 
 
 pytestmark = pytest.mark.integration
diff --git a/tests/integration/pip_source.py b/tests/integration/pip_source.py
index 5d31497..083f844 100644
--- a/tests/integration/pip_source.py
+++ b/tests/integration/pip_source.py
@@ -6,9 +6,9 @@ import pytest
 
 from buildstream import _yaml
 
-from buildstream.testing import cli_integration as cli  # pylint: disable=unused-import
-from buildstream.testing.integration import assert_contains
-from buildstream.testing._utils.site import HAVE_SANDBOX
+from buildstream._testing import cli_integration as cli  # pylint: disable=unused-import
+from buildstream._testing.integration import assert_contains
+from buildstream._testing._utils.site import HAVE_SANDBOX
 
 from tests.testutils.python_repo import setup_pypi_repo  # pylint: disable=unused-import
 
diff --git a/tests/integration/pullbuildtrees.py b/tests/integration/pullbuildtrees.py
index 1a27d38..4d381cb 100644
--- a/tests/integration/pullbuildtrees.py
+++ b/tests/integration/pullbuildtrees.py
@@ -6,8 +6,8 @@ import shutil
 
 import pytest
 
-from buildstream.testing import cli, cli_integration as cli2  # pylint: disable=unused-import
-from buildstream.testing._utils.site import HAVE_SANDBOX
+from buildstream._testing import cli, cli_integration as cli2  # pylint: disable=unused-import
+from buildstream._testing._utils.site import HAVE_SANDBOX
 from buildstream.exceptions import ErrorDomain, LoadErrorReason
 
 from tests.testutils import create_artifact_share
diff --git a/tests/integration/sandbox.py b/tests/integration/sandbox.py
index 5549fc1..6d9fe94 100644
--- a/tests/integration/sandbox.py
+++ b/tests/integration/sandbox.py
@@ -20,8 +20,8 @@
 import os
 import pytest
 
-from buildstream.testing import cli_integration as cli  # pylint: disable=unused-import
-from buildstream.testing._utils.site import HAVE_SANDBOX
+from buildstream._testing import cli_integration as cli  # pylint: disable=unused-import
+from buildstream._testing._utils.site import HAVE_SANDBOX
 
 
 pytestmark = pytest.mark.integration
diff --git a/tests/integration/script.py b/tests/integration/script.py
index eb161c4..75afe40 100644
--- a/tests/integration/script.py
+++ b/tests/integration/script.py
@@ -5,8 +5,8 @@ import os
 import pytest
 
 from buildstream import _yaml
-from buildstream.testing import cli_integration as cli  # pylint: disable=unused-import
-from buildstream.testing._utils.site import HAVE_SANDBOX, BUILDBOX_RUN
+from buildstream._testing import cli_integration as cli  # pylint: disable=unused-import
+from buildstream._testing._utils.site import HAVE_SANDBOX, BUILDBOX_RUN
 
 
 pytestmark = pytest.mark.integration
diff --git a/tests/integration/shell.py b/tests/integration/shell.py
index 4e96fb8..4c626f3 100644
--- a/tests/integration/shell.py
+++ b/tests/integration/shell.py
@@ -7,8 +7,8 @@ import uuid
 import pytest
 
 from buildstream import _yaml
-from buildstream.testing import cli_integration as cli  # pylint: disable=unused-import
-from buildstream.testing._utils.site import HAVE_SANDBOX, BUILDBOX_RUN
+from buildstream._testing import cli_integration as cli  # pylint: disable=unused-import
+from buildstream._testing._utils.site import HAVE_SANDBOX, BUILDBOX_RUN
 from buildstream.exceptions import ErrorDomain
 from buildstream import utils
 
diff --git a/tests/integration/shellbuildtrees.py b/tests/integration/shellbuildtrees.py
index d7e6bc3..b32a15f 100644
--- a/tests/integration/shellbuildtrees.py
+++ b/tests/integration/shellbuildtrees.py
@@ -6,9 +6,9 @@ import shutil
 
 import pytest
 
-from buildstream.testing import cli, cli_integration, Cli  # pylint: disable=unused-import
+from buildstream._testing import cli, cli_integration, Cli  # pylint: disable=unused-import
 from buildstream.exceptions import ErrorDomain
-from buildstream.testing._utils.site import HAVE_SANDBOX
+from buildstream._testing._utils.site import HAVE_SANDBOX
 
 from tests.testutils import ArtifactShare
 
diff --git a/tests/integration/sockets.py b/tests/integration/sockets.py
index 3fb656e..42ec088 100644
--- a/tests/integration/sockets.py
+++ b/tests/integration/sockets.py
@@ -4,8 +4,8 @@
 import os
 import pytest
 
-from buildstream.testing import cli_integration as cli  # pylint: disable=unused-import
-from buildstream.testing._utils.site import HAVE_SANDBOX
+from buildstream._testing import cli_integration as cli  # pylint: disable=unused-import
+from buildstream._testing._utils.site import HAVE_SANDBOX
 
 
 pytestmark = pytest.mark.integration
diff --git a/tests/integration/source-determinism.py b/tests/integration/source-determinism.py
index dcb7798..291f4f7 100644
--- a/tests/integration/source-determinism.py
+++ b/tests/integration/source-determinism.py
@@ -5,8 +5,8 @@ import os
 import pytest
 
 from buildstream import _yaml
-from buildstream.testing import cli_integration as cli  # pylint: disable=unused-import
-from buildstream.testing._utils.site import HAVE_SANDBOX, CASD_SEPARATE_USER
+from buildstream._testing import cli_integration as cli  # pylint: disable=unused-import
+from buildstream._testing._utils.site import HAVE_SANDBOX, CASD_SEPARATE_USER
 
 
 DATA_DIR = os.path.join(os.path.dirname(os.path.realpath(__file__)), "project")
diff --git a/tests/integration/stack.py b/tests/integration/stack.py
index c44d1e0..362452e 100644
--- a/tests/integration/stack.py
+++ b/tests/integration/stack.py
@@ -4,8 +4,8 @@
 import os
 import pytest
 
-from buildstream.testing import cli_integration as cli  # pylint: disable=unused-import
-from buildstream.testing._utils.site import HAVE_SANDBOX
+from buildstream._testing import cli_integration as cli  # pylint: disable=unused-import
+from buildstream._testing._utils.site import HAVE_SANDBOX
 
 
 pytestmark = pytest.mark.integration
diff --git a/tests/integration/symlinks.py b/tests/integration/symlinks.py
index f1d044f..b5cb60e 100644
--- a/tests/integration/symlinks.py
+++ b/tests/integration/symlinks.py
@@ -4,8 +4,8 @@
 import os
 import pytest
 
-from buildstream.testing import cli_integration as cli  # pylint: disable=unused-import
-from buildstream.testing._utils.site import HAVE_SANDBOX
+from buildstream._testing import cli_integration as cli  # pylint: disable=unused-import
+from buildstream._testing._utils.site import HAVE_SANDBOX
 
 
 pytestmark = pytest.mark.integration
diff --git a/tests/integration/workspace.py b/tests/integration/workspace.py
index 754a492..ae50f2c 100644
--- a/tests/integration/workspace.py
+++ b/tests/integration/workspace.py
@@ -5,8 +5,8 @@ import os
 import pytest
 
 from buildstream import _yaml
-from buildstream.testing import cli_integration as cli  # pylint: disable=unused-import
-from buildstream.testing._utils.site import HAVE_SANDBOX
+from buildstream._testing import cli_integration as cli  # pylint: disable=unused-import
+from buildstream._testing._utils.site import HAVE_SANDBOX
 from buildstream.exceptions import ErrorDomain
 from buildstream.utils import BST_ARBITRARY_TIMESTAMP
 
diff --git a/tests/internals/storage_vdir_import.py b/tests/internals/storage_vdir_import.py
index 5db98c1..26ff638 100644
--- a/tests/internals/storage_vdir_import.py
+++ b/tests/internals/storage_vdir_import.py
@@ -23,7 +23,7 @@ from buildstream.storage._filebaseddirectory import FileBasedDirectory
 from buildstream._cas import CASCache
 from buildstream.storage.directory import VirtualDirectoryError
 from buildstream.utils import _set_file_mtime, _parse_timestamp
-from buildstream.testing._utils.site import have_subsecond_mtime
+from buildstream._testing._utils.site import have_subsecond_mtime
 
 
 # These are comparitive tests that check that FileBasedDirectory and
diff --git a/tests/internals/utils_move_atomic.py b/tests/internals/utils_move_atomic.py
index f78ac67..4f86efd 100644
--- a/tests/internals/utils_move_atomic.py
+++ b/tests/internals/utils_move_atomic.py
@@ -10,7 +10,7 @@ from buildstream.utils import (
     _set_file_mtime,
     _parse_timestamp,
 )
-from buildstream.testing._utils.site import have_subsecond_mtime
+from buildstream._testing._utils.site import have_subsecond_mtime
 
 
 @pytest.fixture
diff --git a/tests/plugins/loading.py b/tests/plugins/loading.py
index 2c2058c..64b6252 100644
--- a/tests/plugins/loading.py
+++ b/tests/plugins/loading.py
@@ -11,7 +11,7 @@ import shutil
 import pytest
 
 from buildstream.exceptions import ErrorDomain, LoadErrorReason
-from buildstream.testing import cli  # pylint: disable=unused-import
+from buildstream._testing import cli  # pylint: disable=unused-import
 from buildstream import _yaml
 
 
diff --git a/tests/plugins/shadow.py b/tests/plugins/shadow.py
index e69373a..c94743c 100644
--- a/tests/plugins/shadow.py
+++ b/tests/plugins/shadow.py
@@ -11,7 +11,7 @@
 import os
 import pytest
 
-from buildstream.testing import cli  # pylint: disable=unused-import
+from buildstream._testing import cli  # pylint: disable=unused-import
 from buildstream import _yaml
 
 
diff --git a/tests/remotecache/simple.py b/tests/remotecache/simple.py
index 00b32ec..f34251b 100644
--- a/tests/remotecache/simple.py
+++ b/tests/remotecache/simple.py
@@ -4,8 +4,8 @@
 import os
 import pytest
 
-from buildstream.testing import cli_remote_execution as cli  # pylint: disable=unused-import
-from buildstream.testing.integration import assert_contains
+from buildstream._testing import cli_remote_execution as cli  # pylint: disable=unused-import
+from buildstream._testing.integration import assert_contains
 
 
 pytestmark = pytest.mark.remotecache
diff --git a/tests/remoteexecution/buildfail.py b/tests/remoteexecution/buildfail.py
index 10a1cd4..8a30594 100644
--- a/tests/remoteexecution/buildfail.py
+++ b/tests/remoteexecution/buildfail.py
@@ -22,7 +22,7 @@ import pytest
 
 from buildstream.exceptions import ErrorDomain
 from buildstream import _yaml
-from buildstream.testing import cli_remote_execution as cli  # pylint: disable=unused-import
+from buildstream._testing import cli_remote_execution as cli  # pylint: disable=unused-import
 
 pytestmark = pytest.mark.remoteexecution
 
diff --git a/tests/remoteexecution/buildtree.py b/tests/remoteexecution/buildtree.py
index 32b14cc..d4f9ed9 100644
--- a/tests/remoteexecution/buildtree.py
+++ b/tests/remoteexecution/buildtree.py
@@ -20,7 +20,7 @@ import os
 import shutil
 import pytest
 
-from buildstream.testing import cli_remote_execution as cli  # pylint: disable=unused-import
+from buildstream._testing import cli_remote_execution as cli  # pylint: disable=unused-import
 
 from tests.testutils import create_artifact_share
 
diff --git a/tests/remoteexecution/junction.py b/tests/remoteexecution/junction.py
index 13565cd..8a843d7 100644
--- a/tests/remoteexecution/junction.py
+++ b/tests/remoteexecution/junction.py
@@ -19,8 +19,8 @@
 
 import os
 import pytest
-from buildstream.testing import cli_remote_execution as cli  # pylint: disable=unused-import
-from buildstream.testing import create_repo
+from buildstream._testing import cli_remote_execution as cli  # pylint: disable=unused-import
+from buildstream._testing import create_repo
 from buildstream import _yaml
 from tests.testutils import generate_junction
 
diff --git a/tests/remoteexecution/remotecache.py b/tests/remoteexecution/remotecache.py
index ee3465e..e9ced68 100644
--- a/tests/remoteexecution/remotecache.py
+++ b/tests/remoteexecution/remotecache.py
@@ -6,8 +6,8 @@ import os
 import pytest
 
 from buildstream.exceptions import ErrorDomain
-from buildstream.testing import cli_remote_execution as cli  # pylint: disable=unused-import
-from buildstream.testing.integration import assert_contains
+from buildstream._testing import cli_remote_execution as cli  # pylint: disable=unused-import
+from buildstream._testing.integration import assert_contains
 
 
 pytestmark = pytest.mark.remoteexecution
diff --git a/tests/remoteexecution/simple.py b/tests/remoteexecution/simple.py
index cb8f809..2bb9d3a 100644
--- a/tests/remoteexecution/simple.py
+++ b/tests/remoteexecution/simple.py
@@ -4,8 +4,8 @@
 import os
 import pytest
 
-from buildstream.testing import cli_remote_execution as cli  # pylint: disable=unused-import
-from buildstream.testing.integration import assert_contains
+from buildstream._testing import cli_remote_execution as cli  # pylint: disable=unused-import
+from buildstream._testing.integration import assert_contains
 
 
 pytestmark = pytest.mark.remoteexecution
diff --git a/tests/remoteexecution/workspace.py b/tests/remoteexecution/workspace.py
index 93397cd..9409f5a 100644
--- a/tests/remoteexecution/workspace.py
+++ b/tests/remoteexecution/workspace.py
@@ -6,8 +6,8 @@ import re
 import shutil
 import pytest
 
-from buildstream.testing import cli_remote_execution as cli  # pylint: disable=unused-import
-from buildstream.testing.integration import assert_contains
+from buildstream._testing import cli_remote_execution as cli  # pylint: disable=unused-import
+from buildstream._testing.integration import assert_contains
 
 pytestmark = pytest.mark.remoteexecution
 
diff --git a/tests/sandboxes/missing-command.py b/tests/sandboxes/missing-command.py
index ec6ba18..98ff6ef 100644
--- a/tests/sandboxes/missing-command.py
+++ b/tests/sandboxes/missing-command.py
@@ -6,7 +6,7 @@ import pytest
 
 from buildstream.exceptions import ErrorDomain
 
-from buildstream.testing import cli  # pylint: disable=unused-import
+from buildstream._testing import cli  # pylint: disable=unused-import
 
 
 DATA_DIR = os.path.join(os.path.dirname(os.path.realpath(__file__)), "missing-command")
diff --git a/tests/sandboxes/missing_dependencies.py b/tests/sandboxes/missing_dependencies.py
index 7ac7d78..e5bb4e8 100644
--- a/tests/sandboxes/missing_dependencies.py
+++ b/tests/sandboxes/missing_dependencies.py
@@ -7,8 +7,8 @@ import pytest
 
 from buildstream import utils, _yaml
 from buildstream.exceptions import ErrorDomain
-from buildstream.testing._utils.site import IS_LINUX
-from buildstream.testing import cli  # pylint: disable=unused-import
+from buildstream._testing._utils.site import IS_LINUX
+from buildstream._testing import cli  # pylint: disable=unused-import
 
 
 # Project directory
diff --git a/tests/sandboxes/remote-exec-config.py b/tests/sandboxes/remote-exec-config.py
index b840b51..134d748 100644
--- a/tests/sandboxes/remote-exec-config.py
+++ b/tests/sandboxes/remote-exec-config.py
@@ -6,7 +6,7 @@ import os
 import pytest
 
 from buildstream.exceptions import ErrorDomain, LoadErrorReason
-from buildstream.testing.runcli import cli  # pylint: disable=unused-import
+from buildstream._testing.runcli import cli  # pylint: disable=unused-import
 
 DATA_DIR = os.path.join(os.path.dirname(os.path.realpath(__file__)), "remote-exec-config")
 
diff --git a/tests/sandboxes/selection.py b/tests/sandboxes/selection.py
index 4f3a767..0c482ea 100644
--- a/tests/sandboxes/selection.py
+++ b/tests/sandboxes/selection.py
@@ -20,7 +20,7 @@ import pytest
 
 from buildstream import utils, _yaml
 from buildstream.exceptions import ErrorDomain
-from buildstream.testing import cli  # pylint: disable=unused-import
+from buildstream._testing import cli  # pylint: disable=unused-import
 
 pytestmark = pytest.mark.integration
 
diff --git a/tests/sourcecache/cache.py b/tests/sourcecache/cache.py
index 836c5d5..9eb03b1 100644
--- a/tests/sourcecache/cache.py
+++ b/tests/sourcecache/cache.py
@@ -23,7 +23,7 @@
 import os
 import pytest
 
-from buildstream.testing.runcli import cli  # pylint: disable=unused-import
+from buildstream._testing.runcli import cli  # pylint: disable=unused-import
 from buildstream import _yaml
 
 DATA_DIR = os.path.join(os.path.dirname(os.path.realpath(__file__)), "project")
diff --git a/tests/sourcecache/capabilities.py b/tests/sourcecache/capabilities.py
index 7ca6581..1fa0e28 100644
--- a/tests/sourcecache/capabilities.py
+++ b/tests/sourcecache/capabilities.py
@@ -7,7 +7,7 @@ import pytest
 from buildstream._project import Project
 
 from buildstream import _yaml
-from buildstream.testing.runcli import cli  # pylint: disable=unused-import
+from buildstream._testing.runcli import cli  # pylint: disable=unused-import
 from tests.testutils import dummy_context
 
 from tests.testutils.artifactshare import create_dummy_artifact_share
diff --git a/tests/sourcecache/config.py b/tests/sourcecache/config.py
index 8809e89..dc0c3ff 100644
--- a/tests/sourcecache/config.py
+++ b/tests/sourcecache/config.py
@@ -26,7 +26,7 @@ import pytest
 from buildstream import _yaml
 from buildstream.exceptions import ErrorDomain, LoadErrorReason
 
-from buildstream.testing.runcli import cli  # pylint: disable=unused-import
+from buildstream._testing.runcli import cli  # pylint: disable=unused-import
 
 DATA_DIR = os.path.dirname(os.path.realpath(__file__))
 
diff --git a/tests/sourcecache/fetch.py b/tests/sourcecache/fetch.py
index deaaadc..91edaff 100644
--- a/tests/sourcecache/fetch.py
+++ b/tests/sourcecache/fetch.py
@@ -26,8 +26,8 @@ import pytest
 from buildstream.exceptions import ErrorDomain
 from buildstream._project import Project
 from buildstream import _yaml
-from buildstream.testing import cli  # pylint: disable=unused-import
-from buildstream.testing import create_repo
+from buildstream._testing import cli  # pylint: disable=unused-import
+from buildstream._testing import create_repo
 
 from tests.testutils import create_artifact_share, dummy_context
 
diff --git a/tests/sourcecache/push.py b/tests/sourcecache/push.py
index 1d7c9a5..e65036f 100644
--- a/tests/sourcecache/push.py
+++ b/tests/sourcecache/push.py
@@ -27,8 +27,8 @@ import pytest
 from buildstream.exceptions import ErrorDomain
 from buildstream._project import Project
 from buildstream import _yaml
-from buildstream.testing import cli  # pylint: disable=unused-import
-from buildstream.testing import create_repo
+from buildstream._testing import cli  # pylint: disable=unused-import
+from buildstream._testing import create_repo
 from tests.testutils import create_artifact_share, dummy_context
 
 DATA_DIR = os.path.join(os.path.dirname(os.path.realpath(__file__)), "project")
diff --git a/tests/sourcecache/source-checkout.py b/tests/sourcecache/source-checkout.py
index 605ed1a..b3f7441 100644
--- a/tests/sourcecache/source-checkout.py
+++ b/tests/sourcecache/source-checkout.py
@@ -26,7 +26,7 @@ import shutil
 import pytest
 
 from buildstream.exceptions import ErrorDomain
-from buildstream.testing.runcli import cli  # pylint: disable=unused-import
+from buildstream._testing.runcli import cli  # pylint: disable=unused-import
 
 from tests.testutils.element_generators import create_element_size
 
diff --git a/tests/sourcecache/staging.py b/tests/sourcecache/staging.py
index 9adac9c..9bc9dd4 100644
--- a/tests/sourcecache/staging.py
+++ b/tests/sourcecache/staging.py
@@ -26,7 +26,7 @@ import pytest
 
 from buildstream._project import Project
 
-from buildstream.testing.runcli import cli  # pylint: disable=unused-import
+from buildstream._testing.runcli import cli  # pylint: disable=unused-import
 
 from tests.testutils import dummy_context
 from tests.testutils.element_generators import create_element_size
diff --git a/tests/sourcecache/workspace.py b/tests/sourcecache/workspace.py
index af2b409..dd391c6 100644
--- a/tests/sourcecache/workspace.py
+++ b/tests/sourcecache/workspace.py
@@ -25,7 +25,7 @@ import shutil
 
 import pytest
 
-from buildstream.testing.runcli import cli  # pylint: disable=unused-import
+from buildstream._testing.runcli import cli  # pylint: disable=unused-import
 
 from tests.testutils.artifactshare import create_artifact_share
 from tests.testutils.element_generators import create_element_size
diff --git a/tests/sources/bzr.py b/tests/sources/bzr.py
index 3ba4229..a4f8f22 100644
--- a/tests/sources/bzr.py
+++ b/tests/sources/bzr.py
@@ -7,10 +7,10 @@ import subprocess
 import pytest
 
 from buildstream import _yaml
-from buildstream.testing import cli  # pylint: disable=unused-import
-from buildstream.testing import create_repo
-from buildstream.testing import generate_element
-from buildstream.testing._utils.site import HAVE_BZR
+from buildstream._testing import cli  # pylint: disable=unused-import
+from buildstream._testing import create_repo
+from buildstream._testing import generate_element
+from buildstream._testing._utils.site import HAVE_BZR
 
 pytestmark = pytest.mark.skipif(HAVE_BZR is False, reason="bzr is not available")
 DATA_DIR = os.path.join(os.path.dirname(os.path.realpath(__file__)), "bzr")
diff --git a/tests/sources/git.py b/tests/sources/git.py
index fd0af4c..5b2d474 100644
--- a/tests/sources/git.py
+++ b/tests/sources/git.py
@@ -31,10 +31,10 @@ import pytest
 from buildstream import Node
 from buildstream.exceptions import ErrorDomain
 from buildstream.plugin import CoreWarnings
-from buildstream.testing import cli  # pylint: disable=unused-import
-from buildstream.testing import generate_project, generate_element, load_yaml
-from buildstream.testing import create_repo
-from buildstream.testing._utils.site import HAVE_GIT, HAVE_OLD_GIT
+from buildstream._testing import cli  # pylint: disable=unused-import
+from buildstream._testing import generate_project, generate_element, load_yaml
+from buildstream._testing import create_repo
+from buildstream._testing._utils.site import HAVE_GIT, HAVE_OLD_GIT
 
 DATA_DIR = os.path.join(os.path.dirname(os.path.realpath(__file__)), "git",)
 
diff --git a/tests/sources/keytest.py b/tests/sources/keytest.py
index 860d73e..2df0149 100644
--- a/tests/sources/keytest.py
+++ b/tests/sources/keytest.py
@@ -23,8 +23,8 @@
 import os
 import pytest
 
-from buildstream.testing import ErrorDomain
-from buildstream.testing import cli  # pylint: disable=unused-import
+from buildstream._testing import ErrorDomain
+from buildstream._testing import cli  # pylint: disable=unused-import
 
 DATA_DIR = os.path.join(os.path.dirname(os.path.realpath(__file__)), "project_key_test")
 
diff --git a/tests/sources/local.py b/tests/sources/local.py
index bddc022..2e30984 100644
--- a/tests/sources/local.py
+++ b/tests/sources/local.py
@@ -6,8 +6,8 @@ import pytest
 
 from buildstream import _yaml
 from buildstream.exceptions import ErrorDomain, LoadErrorReason
-from buildstream.testing import cli  # pylint: disable=unused-import
-from buildstream.testing._utils.site import HAVE_SANDBOX
+from buildstream._testing import cli  # pylint: disable=unused-import
+from buildstream._testing._utils.site import HAVE_SANDBOX
 from tests.testutils import filetypegenerator
 
 DATA_DIR = os.path.join(os.path.dirname(os.path.realpath(__file__)), "local",)
diff --git a/tests/sources/no_fetch_cached.py b/tests/sources/no_fetch_cached.py
index 4984f53..0092d33 100644
--- a/tests/sources/no_fetch_cached.py
+++ b/tests/sources/no_fetch_cached.py
@@ -4,10 +4,10 @@
 import os
 import pytest
 
-from buildstream.testing import cli  # pylint: disable=unused-import
-from buildstream.testing import create_repo
-from buildstream.testing import generate_element
-from buildstream.testing._utils.site import HAVE_GIT
+from buildstream._testing import cli  # pylint: disable=unused-import
+from buildstream._testing import create_repo
+from buildstream._testing import generate_element
+from buildstream._testing._utils.site import HAVE_GIT
 
 DATA_DIR = os.path.join(os.path.dirname(os.path.realpath(__file__)), "no-fetch-cached")
 
diff --git a/tests/sources/patch.py b/tests/sources/patch.py
index e6af8df..38fa89d 100644
--- a/tests/sources/patch.py
+++ b/tests/sources/patch.py
@@ -5,7 +5,7 @@ import os
 import pytest
 
 from buildstream.exceptions import ErrorDomain, LoadErrorReason
-from buildstream.testing import cli  # pylint: disable=unused-import
+from buildstream._testing import cli  # pylint: disable=unused-import
 from tests.testutils import filetypegenerator
 
 DATA_DIR = os.path.join(os.path.dirname(os.path.realpath(__file__)), "patch",)
diff --git a/tests/sources/pip.py b/tests/sources/pip.py
index 1eacb44..55fdfe1 100644
--- a/tests/sources/pip.py
+++ b/tests/sources/pip.py
@@ -6,7 +6,7 @@ import pytest
 
 from buildstream.exceptions import ErrorDomain
 from buildstream.plugins.sources.pip import _match_package_name
-from buildstream.testing import cli, generate_project  # pylint: disable=unused-import
+from buildstream._testing import cli, generate_project  # pylint: disable=unused-import
 
 DATA_DIR = os.path.join(os.path.dirname(os.path.realpath(__file__)), "pip",)
 
diff --git a/tests/sources/previous_source_access.py b/tests/sources/previous_source_access.py
index f242ac1..a35044f 100644
--- a/tests/sources/previous_source_access.py
+++ b/tests/sources/previous_source_access.py
@@ -4,8 +4,8 @@
 import os
 import pytest
 
-from buildstream.testing import generate_project, load_yaml
-from buildstream.testing import cli  # pylint: disable=unused-import
+from buildstream._testing import generate_project, load_yaml
+from buildstream._testing import cli  # pylint: disable=unused-import
 
 DATA_DIR = os.path.join(os.path.dirname(os.path.realpath(__file__)), "previous_source_access")
 
diff --git a/tests/sources/remote.py b/tests/sources/remote.py
index 416d2d5..e5fa443 100644
--- a/tests/sources/remote.py
+++ b/tests/sources/remote.py
@@ -6,9 +6,9 @@ import stat
 import pytest
 
 from buildstream import utils
-from buildstream.testing import ErrorDomain
-from buildstream.testing import generate_project
-from buildstream.testing import cli  # pylint: disable=unused-import
+from buildstream._testing import ErrorDomain
+from buildstream._testing import generate_project
+from buildstream._testing import cli  # pylint: disable=unused-import
 from tests.testutils.file_server import create_file_server
 
 DATA_DIR = os.path.join(os.path.dirname(os.path.realpath(__file__)), "remote",)
diff --git a/tests/sources/tar.py b/tests/sources/tar.py
index ed662dc..1615a8b 100644
--- a/tests/sources/tar.py
+++ b/tests/sources/tar.py
@@ -12,9 +12,9 @@ import pytest
 
 from buildstream import utils
 from buildstream.exceptions import ErrorDomain
-from buildstream.testing import generate_project, generate_element
-from buildstream.testing import cli  # pylint: disable=unused-import
-from buildstream.testing._utils.site import HAVE_LZIP
+from buildstream._testing import generate_project, generate_element
+from buildstream._testing import cli  # pylint: disable=unused-import
+from buildstream._testing._utils.site import HAVE_LZIP
 from tests.testutils.file_server import create_file_server
 from . import list_dir_contents
 
diff --git a/tests/sources/variables.py b/tests/sources/variables.py
index 3e9a08f..addbaf8 100644
--- a/tests/sources/variables.py
+++ b/tests/sources/variables.py
@@ -6,7 +6,7 @@ import os
 import pytest
 
 from buildstream.exceptions import ErrorDomain, LoadErrorReason
-from buildstream.testing.runcli import cli  # pylint: disable=unused-import
+from buildstream._testing.runcli import cli  # pylint: disable=unused-import
 
 
 DATA_DIR = os.path.join(os.path.dirname(os.path.realpath(__file__)), "variables")
diff --git a/tests/sources/zip.py b/tests/sources/zip.py
index 201271f..7569c2a 100644
--- a/tests/sources/zip.py
+++ b/tests/sources/zip.py
@@ -7,8 +7,8 @@ import zipfile
 import pytest
 
 from buildstream.exceptions import ErrorDomain
-from buildstream.testing import generate_project
-from buildstream.testing import cli  # pylint: disable=unused-import
+from buildstream._testing import generate_project
+from buildstream._testing import cli  # pylint: disable=unused-import
 from tests.testutils.file_server import create_file_server
 from . import list_dir_contents
 
diff --git a/tests/testutils/element_generators.py b/tests/testutils/element_generators.py
index 6da465a..5c6fa5d 100644
--- a/tests/testutils/element_generators.py
+++ b/tests/testutils/element_generators.py
@@ -2,7 +2,7 @@ import os
 
 from buildstream import _yaml
 from buildstream import utils
-from buildstream.testing import create_repo
+from buildstream._testing import create_repo
 
 
 # create_element_size()
diff --git a/tests/testutils/junction.py b/tests/testutils/junction.py
index 4889fdb..0a94846 100644
--- a/tests/testutils/junction.py
+++ b/tests/testutils/junction.py
@@ -1,5 +1,5 @@
 from buildstream import _yaml
-from buildstream.testing import create_repo
+from buildstream._testing import create_repo
 
 
 # generate_junction()
diff --git a/tests/testutils/repo/bzr.py b/tests/testutils/repo/bzr.py
index 7421be8..038d759 100644
--- a/tests/testutils/repo/bzr.py
+++ b/tests/testutils/repo/bzr.py
@@ -2,8 +2,8 @@ import os
 import subprocess
 import pytest
 
-from buildstream.testing import Repo
-from buildstream.testing._utils.site import BZR, BZR_ENV, HAVE_BZR
+from buildstream._testing import Repo
+from buildstream._testing._utils.site import BZR, BZR_ENV, HAVE_BZR
 
 
 class Bzr(Repo):
diff --git a/tests/testutils/repo/git.py b/tests/testutils/repo/git.py
index 02fe878..5076d30 100644
--- a/tests/testutils/repo/git.py
+++ b/tests/testutils/repo/git.py
@@ -4,8 +4,8 @@ import subprocess
 
 import pytest
 
-from buildstream.testing import Repo
-from buildstream.testing._utils.site import GIT, GIT_ENV, HAVE_GIT
+from buildstream._testing import Repo
+from buildstream._testing._utils.site import GIT, GIT_ENV, HAVE_GIT
 
 
 class Git(Repo):
diff --git a/tests/testutils/repo/tar.py b/tests/testutils/repo/tar.py
index 3eb9d89..0b3236a 100644
--- a/tests/testutils/repo/tar.py
+++ b/tests/testutils/repo/tar.py
@@ -3,7 +3,7 @@ import tarfile
 
 from buildstream.utils import sha256sum
 
-from buildstream.testing import Repo
+from buildstream._testing import Repo
 
 
 class Tar(Repo):
diff --git a/tests/testutils/repo/zip.py b/tests/testutils/repo/zip.py
index 38419e6..d2f8d9b 100644
--- a/tests/testutils/repo/zip.py
+++ b/tests/testutils/repo/zip.py
@@ -3,7 +3,7 @@ import zipfile
 
 from buildstream.utils import sha256sum
 
-from buildstream.testing import Repo
+from buildstream._testing import Repo
 
 
 class Zip(Repo):