ÿØÿà JFIF ` ` ÿþxØ
| Server IP : 109.234.164.53 / Your IP : 216.73.216.110 Web Server : Apache System : Linux cervelle.o2switch.net 4.18.0-553.32.1.lve.el8.x86_64 #1 SMP Thu Dec 19 13:14:03 UTC 2024 x86_64 User : computer3 ( 1098) PHP Version : 7.1.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /opt/alt/python33/lib64/python3.3/test/test_importlib/extension/ |
Upload File : |
from importlib import machinery
from .. import abc
from . import util
import unittest
class FinderTests(abc.FinderTests):
"""Test the finder for extension modules."""
def find_module(self, fullname):
importer = machinery.FileFinder(util.PATH,
(machinery.ExtensionFileLoader,
machinery.EXTENSION_SUFFIXES))
return importer.find_module(fullname)
def test_module(self):
self.assertTrue(self.find_module(util.NAME))
# No extension module as an __init__ available for testing.
test_package = test_package_in_package = None
# No extension module in a package available for testing.
test_module_in_package = None
# Extension modules cannot be an __init__ for a package.
test_package_over_module = None
def test_failure(self):
self.assertIsNone(self.find_module('asdfjkl;'))
def test_main():
from test.support import run_unittest
run_unittest(FinderTests)
if __name__ == '__main__':
test_main()