✘✘ GRAYBYTE WORDPRESS FILE MANAGER ✘✘

​🇳​​🇦​​🇲​​🇪♯➤ beluga.o2switch.net ​🇻​♯➤ 4.18.0-553.123.2.lve.el8.x86_64 #1 SMP 🇾​♯➤ 2026

𝗛𝗢𝗠𝗘 𝗜𝗗 ♯➤ 185.154.139.77 ♯➤ 𝗔𝗗𝗠𝗜𝗡 𝗜𝗗 216.73.216.84
𝗢𝗣𝗧𝗜𝗢𝗡𝗦 ♯ CRL ♯➤ 𝗢𝗞 ┃ WGT ♯➤ 𝗢𝗞 ┃ SDO ♯➤ 𝗢𝗙𝗙 ┃ PKEX ♯➤ 𝗢𝗙𝗙
𝗗𝗘𝗔𝗖𝗧𝗜𝗩𝗔𝗧𝗘𝗗 ♯➤ 𝗔𝗟𝗟 𝗪𝗢𝗥𝗞𝗜𝗡𝗚....

𝗛𝗢𝗠𝗘
𝗖𝗨𝗥𝗥𝗘𝗡𝗧 𝗙𝗜𝗟𝗘 : /opt/alt/python33/lib64/python3.3/distutils/tests//test_sysconfig.py
"""Tests for distutils.sysconfig."""
import os
import shutil
import test
import unittest

from distutils import sysconfig
from distutils.ccompiler import get_default_compiler
from distutils.tests import support
from test.support import TESTFN, run_unittest

class SysconfigTestCase(support.EnvironGuard,
                        unittest.TestCase):
    def setUp(self):
        super(SysconfigTestCase, self).setUp()
        self.makefile = None

    def tearDown(self):
        if self.makefile is not None:
            os.unlink(self.makefile)
        self.cleanup_testfn()
        super(SysconfigTestCase, self).tearDown()

    def cleanup_testfn(self):
        if os.path.isfile(TESTFN):
            os.remove(TESTFN)
        elif os.path.isdir(TESTFN):
            shutil.rmtree(TESTFN)

    def test_get_config_h_filename(self):
        config_h = sysconfig.get_config_h_filename()
        self.assertTrue(os.path.isfile(config_h), config_h)

    def test_get_python_lib(self):
        lib_dir = sysconfig.get_python_lib()
        # XXX doesn't work on Linux when Python was never installed before
        #self.assertTrue(os.path.isdir(lib_dir), lib_dir)
        # test for pythonxx.lib?
        self.assertNotEqual(sysconfig.get_python_lib(),
                            sysconfig.get_python_lib(prefix=TESTFN))

    def test_get_python_inc(self):
        inc_dir = sysconfig.get_python_inc()
        # This is not much of a test.  We make sure Python.h exists
        # in the directory returned by get_python_inc() but we don't know
        # it is the correct file.
        self.assertTrue(os.path.isdir(inc_dir), inc_dir)
        python_h = os.path.join(inc_dir, "Python.h")
        self.assertTrue(os.path.isfile(python_h), python_h)

    def test_get_config_vars(self):
        cvars = sysconfig.get_config_vars()
        self.assertIsInstance(cvars, dict)
        self.assertTrue(cvars)

    def test_srcdir(self):
        # See Issues #15322, #15364.
        srcdir = sysconfig.get_config_var('srcdir')

        self.assertTrue(os.path.isabs(srcdir), srcdir)
        self.assertTrue(os.path.isdir(srcdir), srcdir)

        if sysconfig.python_build:
            # The python executable has not been installed so srcdir
            # should be a full source checkout.
            Python_h = os.path.join(srcdir, 'Include', 'Python.h')
            self.assertTrue(os.path.exists(Python_h), Python_h)
            self.assertTrue(sysconfig._is_python_source_dir(srcdir))
        elif os.name == 'posix':
            self.assertEqual(os.path.dirname(sysconfig.get_makefile_filename()),
                                 srcdir)

    def test_srcdir_independent_of_cwd(self):
        # srcdir should be independent of the current working directory
        # See Issues #15322, #15364.
        srcdir = sysconfig.get_config_var('srcdir')
        cwd = os.getcwd()
        try:
            os.chdir('..')
            srcdir2 = sysconfig.get_config_var('srcdir')
        finally:
            os.chdir(cwd)
        self.assertEqual(srcdir, srcdir2)

    @unittest.skipUnless(get_default_compiler() == 'unix',
                         'not testing if default compiler is not unix')
    def test_customize_compiler(self):
        os.environ['AR'] = 'my_ar'
        os.environ['ARFLAGS'] = '-arflags'

        # make sure AR gets caught
        class compiler:
            compiler_type = 'unix'

            def set_executables(self, **kw):
                self.exes = kw

        comp = compiler()
        sysconfig.customize_compiler(comp)
        self.assertEqual(comp.exes['archiver'], 'my_ar -arflags')

    def test_parse_makefile_base(self):
        self.makefile = TESTFN
        fd = open(self.makefile, 'w')
        try:
            fd.write(r"CONFIG_ARGS=  '--arg1=optarg1' 'ENV=LIB'" '\n')
            fd.write('VAR=$OTHER\nOTHER=foo')
        finally:
            fd.close()
        d = sysconfig.parse_makefile(self.makefile)
        self.assertEqual(d, {'CONFIG_ARGS': "'--arg1=optarg1' 'ENV=LIB'",
                             'OTHER': 'foo'})

    def test_parse_makefile_literal_dollar(self):
        self.makefile = TESTFN
        fd = open(self.makefile, 'w')
        try:
            fd.write(r"CONFIG_ARGS=  '--arg1=optarg1' 'ENV=\$$LIB'" '\n')
            fd.write('VAR=$OTHER\nOTHER=foo')
        finally:
            fd.close()
        d = sysconfig.parse_makefile(self.makefile)
        self.assertEqual(d, {'CONFIG_ARGS': r"'--arg1=optarg1' 'ENV=\$LIB'",
                             'OTHER': 'foo'})


    def test_sysconfig_module(self):
        import sysconfig as global_sysconfig
        self.assertEqual(global_sysconfig.get_config_var('CFLAGS'), sysconfig.get_config_var('CFLAGS'))
        self.assertEqual(global_sysconfig.get_config_var('LDFLAGS'), sysconfig.get_config_var('LDFLAGS'))

    @unittest.skipIf(sysconfig.get_config_var('CUSTOMIZED_OSX_COMPILER'),'compiler flags customized')
    def test_sysconfig_compiler_vars(self):
        # On OS X, binary installers support extension module building on
        # various levels of the operating system with differing Xcode
        # configurations.  This requires customization of some of the
        # compiler configuration directives to suit the environment on
        # the installed machine.  Some of these customizations may require
        # running external programs and, so, are deferred until needed by
        # the first extension module build.  With Python 3.3, only
        # the Distutils version of sysconfig is used for extension module
        # builds, which happens earlier in the Distutils tests.  This may
        # cause the following tests to fail since no tests have caused
        # the global version of sysconfig to call the customization yet.
        # The solution for now is to simply skip this test in this case.
        # The longer-term solution is to only have one version of sysconfig.

        import sysconfig as global_sysconfig
        if sysconfig.get_config_var('CUSTOMIZED_OSX_COMPILER'):
            self.skipTest('compiler flags customized')
        self.assertEqual(global_sysconfig.get_config_var('LDSHARED'), sysconfig.get_config_var('LDSHARED'))
        self.assertEqual(global_sysconfig.get_config_var('CC'), sysconfig.get_config_var('CC'))



def test_suite():
    suite = unittest.TestSuite()
    suite.addTest(unittest.makeSuite(SysconfigTestCase))
    return suite


if __name__ == '__main__':
    run_unittest(test_suite())


Current_dir [ 𝗡𝗢𝗧 𝗪𝗥𝗜𝗧𝗘𝗔𝗕𝗟𝗘 ] Document_root [ 𝗪𝗥𝗜𝗧𝗘𝗔𝗕𝗟𝗘 ]


[ Back ]
𝗡𝗔𝗠𝗘
𝗦𝗜𝗭𝗘
𝗟𝗔𝗦𝗧 𝗧𝗢𝗨𝗖𝗛
𝗨𝗦𝗘𝗥
𝗦𝗧𝗔𝗧𝗨𝗦
𝗙𝗨𝗡𝗖𝗧𝗜𝗢𝗡𝗦
..
--
25 Jul 2024 8.41 AM
root / linksafe
0755
__pycache__
--
25 Jul 2024 8.41 AM
root / linksafe
0755
Setup.sample
2.196 KB
19 Sep 2017 7.32 AM
root / linksafe
0644
__init__.py
1.035 KB
17 Apr 2024 4.58 PM
root / linksafe
0644
support.py
6.38 KB
17 Apr 2024 4.58 PM
root / linksafe
0644
test_archive_util.py
9.379 KB
17 Apr 2024 4.58 PM
root / linksafe
0644
test_bdist.py
1.498 KB
17 Apr 2024 4.58 PM
root / linksafe
0644
test_bdist_dumb.py
2.896 KB
17 Apr 2024 4.58 PM
root / linksafe
0644
test_bdist_msi.py
0.711 KB
17 Apr 2024 4.58 PM
root / linksafe
0644
test_bdist_rpm.py
4.838 KB
17 Apr 2024 4.58 PM
root / linksafe
0644
test_bdist_wininst.py
1.016 KB
17 Apr 2024 4.58 PM
root / linksafe
0644
test_build.py
1.874 KB
17 Apr 2024 4.58 PM
root / linksafe
0644
test_build_clib.py
4.861 KB
17 Apr 2024 4.58 PM
root / linksafe
0644
test_build_ext.py
17.393 KB
17 Apr 2024 4.58 PM
root / linksafe
0644
test_build_py.py
6.029 KB
17 Apr 2024 4.58 PM
root / linksafe
0644
test_build_scripts.py
3.509 KB
17 Apr 2024 4.58 PM
root / linksafe
0644
test_check.py
3.907 KB
17 Apr 2024 4.58 PM
root / linksafe
0644
test_clean.py
1.433 KB
17 Apr 2024 4.58 PM
root / linksafe
0644
test_cmd.py
3.745 KB
17 Apr 2024 4.58 PM
root / linksafe
0644
test_config.py
3.08 KB
17 Apr 2024 4.58 PM
root / linksafe
0644
test_config_cmd.py
2.541 KB
17 Apr 2024 4.58 PM
root / linksafe
0644
test_core.py
2.956 KB
17 Apr 2024 4.58 PM
root / linksafe
0644
test_cygwinccompiler.py
5.538 KB
17 Apr 2024 4.58 PM
root / linksafe
0644
test_dep_util.py
2.766 KB
17 Apr 2024 4.58 PM
root / linksafe
0644
test_dir_util.py
4.173 KB
17 Apr 2024 4.58 PM
root / linksafe
0644
test_dist.py
14.605 KB
17 Apr 2024 4.58 PM
root / linksafe
0644
test_extension.py
2.703 KB
17 Apr 2024 4.58 PM
root / linksafe
0644
test_file_util.py
1.863 KB
17 Apr 2024 4.58 PM
root / linksafe
0644
test_filelist.py
9.837 KB
17 Apr 2024 4.58 PM
root / linksafe
0644
test_install.py
8.291 KB
17 Apr 2024 4.58 PM
root / linksafe
0644
test_install_data.py
2.542 KB
17 Apr 2024 4.58 PM
root / linksafe
0644
test_install_headers.py
1.234 KB
17 Apr 2024 4.58 PM
root / linksafe
0644
test_install_lib.py
3.756 KB
17 Apr 2024 4.58 PM
root / linksafe
0644
test_install_scripts.py
2.563 KB
17 Apr 2024 4.58 PM
root / linksafe
0644
test_log.py
1.203 KB
17 Apr 2024 4.58 PM
root / linksafe
0644
test_msvc9compiler.py
5.899 KB
17 Apr 2024 4.58 PM
root / linksafe
0644
test_register.py
9.074 KB
17 Apr 2024 4.58 PM
root / linksafe
0644
test_sdist.py
14.322 KB
17 Apr 2024 4.58 PM
root / linksafe
0644
test_spawn.py
1.813 KB
17 Apr 2024 4.58 PM
root / linksafe
0644
test_sysconfig.py
6.319 KB
17 Apr 2024 4.58 PM
root / linksafe
0644
test_text_file.py
3.355 KB
17 Apr 2024 4.58 PM
root / linksafe
0644
test_unixccompiler.py
4.757 KB
17 Apr 2024 4.58 PM
root / linksafe
0644
test_upload.py
3.698 KB
17 Apr 2024 4.58 PM
root / linksafe
0644
test_util.py
10.991 KB
17 Apr 2024 4.58 PM
root / linksafe
0644
test_version.py
2.553 KB
17 Apr 2024 4.58 PM
root / linksafe
0644
test_versionpredicate.py
0.273 KB
17 Apr 2024 4.58 PM
root / linksafe
0644
xxmodule.c
12.06 KB
19 Sep 2017 7.32 AM
root / linksafe
0644

✘✘ GRAYBYTE WORDPRESS FILE MANAGER @ 2026 CONTACT ME ✘✘
Static GIF Static GIF