mirror of
https://github.com/python/cpython.git
synced 2025-09-25 01:43:11 +00:00
test_packaging should clean up after itself (but it doesn't really)
This commit is contained in:
parent
9e42a4dbaa
commit
db535957cd
1 changed files with 9 additions and 6 deletions
|
@ -5,15 +5,18 @@
|
|||
import os
|
||||
import sys
|
||||
import unittest
|
||||
from test.support import run_unittest, reap_children
|
||||
from test.support import run_unittest, reap_children, reap_threads
|
||||
|
||||
|
||||
@reap_threads
|
||||
def test_main():
|
||||
start_dir = os.path.dirname(__file__)
|
||||
top_dir = os.path.dirname(os.path.dirname(start_dir))
|
||||
test_loader = unittest.TestLoader()
|
||||
run_unittest(test_loader.discover(start_dir, top_level_dir=top_dir))
|
||||
reap_children()
|
||||
try:
|
||||
start_dir = os.path.dirname(__file__)
|
||||
top_dir = os.path.dirname(os.path.dirname(start_dir))
|
||||
test_loader = unittest.TestLoader()
|
||||
run_unittest(test_loader.discover(start_dir, top_level_dir=top_dir))
|
||||
finally:
|
||||
reap_children()
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue