mirror of
https://github.com/python/cpython.git
synced 2025-09-25 17:59:57 +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,14 +5,17 @@
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
import unittest
|
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():
|
def test_main():
|
||||||
|
try:
|
||||||
start_dir = os.path.dirname(__file__)
|
start_dir = os.path.dirname(__file__)
|
||||||
top_dir = os.path.dirname(os.path.dirname(start_dir))
|
top_dir = os.path.dirname(os.path.dirname(start_dir))
|
||||||
test_loader = unittest.TestLoader()
|
test_loader = unittest.TestLoader()
|
||||||
run_unittest(test_loader.discover(start_dir, top_level_dir=top_dir))
|
run_unittest(test_loader.discover(start_dir, top_level_dir=top_dir))
|
||||||
|
finally:
|
||||||
reap_children()
|
reap_children()
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue