gh-131290: ensure that test files can be executed as standalone scripts (#131371)

---------

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
This commit is contained in:
Maksim 2025-04-12 10:46:19 +03:00 committed by GitHub
parent 2aab2db146
commit 292a7248cd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 39 additions and 8 deletions

View file

@ -297,4 +297,6 @@ def load_tests(loader, tests, pattern):
if __name__ == "__main__":
# set __name__ to match doctest expectations
__name__ = "test.test_metaclass"
unittest.main()