mirror of
https://github.com/python/cpython.git
synced 2025-08-30 05:35:08 +00:00
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:
parent
2aab2db146
commit
292a7248cd
4 changed files with 39 additions and 8 deletions
|
@ -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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue