From https://integration.wikimedia.org/ci/job/pywikibot-core-tox-doc-docker/3742/console:
reading sources... [ 52%] api_ref/tests/page_tests reading sources... [ 53%] api_ref/tests/pagegenerators_tests reading sources... [ 54%] api_ref/tests/paraminfo_tests reading sources... [ 55%] api_ref/tests/patrolbot_tests reading sources... [ 56%] api_ref/tests/plural_tests reading sources... [ 56%] api_ref/tests/proofreadpage_tests reading sources... [ 57%] api_ref/tests/protectbot_tests reading sources... [ 58%] api_ref/tests/pwb reading sources... [ 59%] api_ref/tests/pwb.print_env os.environ: 'BASE_LOG_PATH': '99/459499/3' 'BUILD_DISPLAY_NAME': '#3742' 'BUILD_ID': '3742' 'BUILD_NUMBER': '3742' 'BUILD_TAG': 'jenkins-pywikibot-core-tox-doc-docker-3742' 'BUILD_TIMEOUT': '30' [...]
This is because tests/pwb.print_env.py does not have a if __name__ == '__main__': ... statement.