2009-08-27 20:49:56 -03:00
|
|
|
import importlib
|
|
|
|
from importlib.test.import_ import util
|
2009-07-15 01:08:33 -03:00
|
|
|
import os.path
|
|
|
|
from test.support import run_unittest
|
2009-08-27 20:49:56 -03:00
|
|
|
import sys
|
2009-07-15 01:08:33 -03:00
|
|
|
import unittest
|
|
|
|
|
|
|
|
|
|
|
|
def test_main():
|
|
|
|
start_dir = os.path.dirname(__file__)
|
|
|
|
top_dir = os.path.dirname(os.path.dirname(start_dir))
|
|
|
|
test_loader = unittest.TestLoader()
|
2009-08-27 20:49:56 -03:00
|
|
|
if '--builtin' in sys.argv:
|
|
|
|
util.using___import__ = True
|
2009-07-15 01:08:33 -03:00
|
|
|
run_unittest(test_loader.discover(start_dir, top_level_dir=top_dir))
|
|
|
|
|
|
|
|
|
|
|
|
if __name__ == '__main__':
|
|
|
|
test_main()
|