summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_site.py
Commit message (Collapse)AuthorAgeFilesLines
* gh-121103: Put free-threaded libraries in `lib/python3.14t` (#121293)Sam Gross2024-07-111-2/+2
| | | | | On POSIX systems, excluding macOS framework installs, the lib directory for the free-threaded build now includes a "t" suffix to avoid conflicts with a co-located default build installation.
* gh-120417: Add #noqa: F401 to tests (#120627)Victor Stinner2024-06-181-1/+1
| | | | Ignore linter "imported but unused" warnings in tests when the linter doesn't understand how the import is used.
* gh-113659: Skip hidden .pth files (GH-113660)Serhiy Storchaka2024-01-161-0/+40
| | | | Skip .pth files with names starting with a dot or hidden file attribute.
* gh-73965: New environment variable PYTHON_HISTORY (#13208)Zackery Spytz2024-01-071-0/+14
| | | | | | | | It can be used to set the location of a .python_history file --------- Co-authored-by: Levi Sabah <0xl3vi@gmail.com> Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
* gh-113628: Fix test_site test with long stdlib paths (#113640)Itamar Oren2024-01-031-22/+21
|
* gh-108747: Add unit tests for site.{usercustomize,sitecustomize} hooks (#109470)Charles Machalow2023-10-181-0/+38
|
* gh-109237: Fix test_site for non-ASCII working directory (#109238)Victor Stinner2023-09-101-2/+2
| | | | | | Fix test_site.test_underpth_basic() when the working directory contains at least one non-ASCII character: encode the "._pth" file to UTF-8 and enable the UTF-8 Mode to use UTF-8 for the child process stdout.
* Reorder some test's decorators (GH-108804)Serhiy Storchaka2023-09-031-2/+2
| | | | For example, do not demand the 'cpu' resource if the test cannot be run due to non-working threads.
* gh-94205: Ensures all required DLLs are copied on Windows for underpth tests ↵Steve Dower2022-06-241-0/+2
| | | | (GH-94206)
* GH-77403: Fix tests which fail when PYTHONUSERBASE is not normalized (GH-93917)Irit Katriel2022-06-171-2/+2
|
* gh-84623: Remove unused imports in tests (#93772)Victor Stinner2022-06-131-2/+1
|
* bpo-47152: Convert the re module into a package (GH-32177)Serhiy Storchaka2022-04-021-1/+1
| | | The sre_* modules are now deprecated.
* bpo-46659: Update the test on the mbcs codec alias (GH-31168)Victor Stinner2022-02-061-10/+0
| | | | | | | | | | | encodings registers the _alias_mbcs() codec search function before the search_function() codec search function. Previously, the _alias_mbcs() was never used. Fix the test_codecs.test_mbcs_alias() test: use the current ANSI code page, not a fake ANSI code page number. Remove the test_site.test_aliasing_mbcs() test: the alias is now implemented in the encodings module, no longer in the site module.
* bpo-40280: Skip subprocess-based tests on wasm32-emscripten (GH-30615)Christian Heimes2022-01-251-0/+9
|
* bpo-46049: Fixes ._pth support on non-Windows (GH-30051)Steve Dower2021-12-111-22/+34
|
* bpo-46048: Fix parsing of single character lines in getpath readlines() ↵Steve Dower2021-12-111-0/+20
| | | | (GH-30048)
* bpo-45582: Port getpath[p].c to Python (GH-29041)Steve Dower2021-12-031-9/+13
| | | | | The getpath.py file is frozen at build time and executed as code over a namespace. It is never imported, nor is it meant to be importable or reusable. However, it should be easier to read, modify, and patch than the previous code. This commit attempts to preserve every previously tested quirk, but these may be changed in the future to better align platforms.
* bpo-45020: Freeze os, site, and codecs. (gh-28398)Eric Snow2021-09-171-3/+3
| | | https://bugs.python.org/issue45020
* bpo-36160: Fix test_site so that it can run independently of other tests ↵native-api2021-05-201-2/+4
| | | | (GH-12131)
* bpo-43105: Importlib now resolves relative paths when creating module spec ↵Steve Dower2021-04-071-49/+1
| | | | objects from file locations (GH-25121)
* bpo-31904: Fix site and sysconfig modules for VxWorks RTOS (GH-21821)pxinwr2020-12-201-0/+5
|
* bpo-41939: always enable test_site.test_license_exists_at_url (GH-22688)Ned Deily2020-10-141-2/+0
|
* bpo-41939: Fix test_site.test_license_exists_at_url() (#22559)Victor Stinner2020-10-051-0/+2
| | | | Call urllib.request.urlcleanup() to reset the global urllib.request._opener.
* bpo-33689: Blank lines in .pth file cause a duplicate sys.path entry (GH-20679)idomic2020-09-191-1/+6
|
* bpo-40275: Use new test.support helper submodules in tests (GH-21743)Hai Shi2020-08-061-1/+2
|
* bpo-40275: Use new test.support helper submodules in tests (GH-21727)Hai Shi2020-08-041-2/+2
|
* bpo-41304: Ensure python3x._pth is loaded on Windows (GH-21495)Steve Dower2020-07-151-2/+34
|
* bpo-41043: Escape literal part of the path for glob(). (GH-20994)Serhiy Storchaka2020-06-201-1/+1
|
* bpo-33944: site: Add site-packages tracing in verbose mode (GH-12110)native-api2020-06-121-0/+9
|
* bpo-40275: Move transient_internet from test.support to socket_helper (GH-19711)Serhiy Storchaka2020-04-291-1/+2
|
* bpo-27807: Skip test_site.test_startup_imports() if pth file (GH-19060)Victor Stinner2020-03-181-4/+23
| | | | | | test_site.test_startup_imports() is now skipped if a path of sys.path contains a .pth file. Sort test_site imports.
* bpo-1294959: Add sys.platlibdir attribute (GH-18381)Victor Stinner2020-03-101-2/+9
| | | | | | | | | | | | | Add --with-platlibdir option to the configure script: name of the platform-specific library directory, stored in the new sys.platlitdir attribute. It is used to build the path of platform-specific dynamic libraries and the path of the standard library. It is equal to "lib" on most platforms. On Fedora and SuSE, it is equal to "lib64" on 64-bit systems. Co-Authored-By: Jan Matějek <jmatejek@suse.com> Co-Authored-By: Matěj Cepl <mcepl@cepl.eu> Co-Authored-By: Charalampos Stratakis <cstratak@redhat.com>
* simplify StartupImportTests (GH-13096)Inada Naoki2019-05-051-7/+7
| | | _osx_support and copyreg are not imported from site on macOS for now.
* bpo-22831: Use "with" to avoid possible fd leaks in tests (part 2). (GH-10929)Serhiy Storchaka2019-03-051-4/+3
|
* fixed duplicated method name of test_getuserbase() (GH-12140)native-api2019-03-031-1/+3
|
* bpo-33306: Improve SyntaxError messages for unbalanced parentheses. (GH-6516)Serhiy Storchaka2018-12-171-2/+2
|
* bpo-10496: posixpath.expanduser() catchs pwd.getpwuid() error (GH-10919)Victor Stinner2018-12-051-0/+37
| | | | | | | * posixpath.expanduser() now returns the input path unchanged if the HOME environment variable is not set and pwd.getpwuid() raises KeyError (the current user identifier doesn't exist in the password database). * Add test_no_home_directory() to test_site.
* bpo-30167: Add test for module.__cached__ is None (GH-7617)INADA Naoki2018-10-011-0/+11
|
* bpo-34011: Fixes missing venv files and other tests (GH-9458)Steve Dower2018-09-201-35/+43
|
* bpo-33721: Make some os.path functions and pathlib.Path methods be tolerant ↵Serhiy Storchaka2018-09-181-7/+5
| | | | | | | | | | to invalid paths. (#7695) Such functions as os.path.exists(), os.path.lexists(), os.path.isdir(), os.path.isfile(), os.path.islink(), and os.path.ismount() now return False instead of raising ValueError or its subclasses UnicodeEncodeError and UnicodeDecodeError for paths that contain characters or bytes unrepresentative at the OS level.
* Use assertTrue() instead of deprecated assert_(). (#5526)Serhiy Storchaka2018-02-041-1/+1
|
* bpo-28440: Don't add /Library/Python/3.x/site-packages to sys.path (#5445)Ned Deily2018-01-301-14/+2
| | | | | | | | No longer add /Library/Python/3.x/site-packages, the Apple-supplied system Python site-packages directory, to sys.path for macOS framework builds in case Apple ships a version of Python 3. A similar change was made earlier to Python 2.7 where it was found that the coupling between the system Python and a user-installed framework Python often caused confusion or pip install failures.
* bpo-32297: Few misspellings found in Python source code comments. (#4803)Mike2017-12-141-1/+1
| | | | | | | | * Fix multiple typos in code comments * Add spacing in comments (test_logging.py, test_math.py) * Fix spaces at the beginning of comments in test_logging.py
* bpo-29585: fix test fail on macOS Framework build (GH-2928)INADA Naoki2017-07-281-1/+5
|
* bpo-28095: Re-enable temporarily disabled part of test_startup_imports on ↵Ned Deily2017-07-281-3/+1
| | | | | | | | macOS (#2927) The changes for bpo-29585 eliminate the extra imports on macOS that caused the original test failure. This reverts commit 8a2150aae6db4d664c96a038ef6abacd4bcbcdc9.
* bpo-29585: optimize site.py startup time (GH-136)INADA Naoki2017-06-281-0/+7
| | | | Avoid importing `sysconfig` from `site` by copying minimum code. Python startup is 5% faster on Linux and 30% faster on macOS
* Improves test_underpth_nosite_file to reveal why it fails. (#1763)Steve Dower2017-05-231-6/+10
| | | | | | | | | | | | | | * Improves test_underpth_nosite_file to reveal why it fails. * Enable building with Windows 10 SDK. * Fix WinSDK detection * Fix initialization on Windows when a ._pth file exists. * Fix tabs * Adds comment about Py_GetPath call.
* bpo-22257: Small changes for PEP 432. (#1728)Eric Snow2017-05-231-3/+6
| | | PEP 432 specifies a number of large changes to interpreter startup code, including exposing a cleaner C-API. The major changes depend on a number of smaller changes. This patch includes all those smaller changes.
* bpo-29763: Clean up _pth tests (GH-954)Zachary Ware2017-05-141-46/+31
|
* bpo-30108: Restore sys.path in test_site (#1197)Victor Stinner2017-04-201-8/+21
| | | | | | Add setUpModule() and tearDownModule() functions to test_site to save/restore sys.path at the module level to prevent warning if the user site directory is created, since site.addsitedir() modifies sys.path.