tests/artifactshare: safer cleanup_on_sigterm use

Use the documented path [1] to `pytest_cov.embed.cleanup_on_sigterm()`,
to avoid crashing on some versions.

It turns out that pytest_cov v2.6.1 on my machine doesn't like the way
that we were accessing cleanup_on_sigterm(). Access it in such a way
that we will either get the function or an ImportError, as per the
documentation.

[1]: https://pytest-cov.readthedocs.io/en/latest/subprocess-support.html
1 file changed