When cts-cli runs as part of %check in the package build process (like what happens during CI runs), it should write temporary data to the build directory and not to /tmp or any other global directory. It should be to somewhere that can be captured and cleaned up after the build completes.
The python regression tests use NamedTemporaryFile, TemporaryDirectory, mkstemp, and mkdtemp. All of these should respect $TMPDIR or at least take a parameter to specify the temporary directory. We need to use that and then pass that location to cts-cli via the environment in the spec file. After tests complete (successfully or not), we need to make sure to clean up after ourselves. The context managers in the python side of things should already be doing this, but there may be places where we're not using those.