summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_genericpath.py
Commit message (Collapse)AuthorAgeFilesLines
* gh-106242: Fix path truncation in os.path.normpath (GH-106816)Finn Womack2023-08-151-0/+4
|
* gh-90473: Skip tests that don't apply to Emscripten and WASI (GH-92846)Christian Heimes2022-05-161-1/+1
|
* bpo-40280: Block more non-working syscalls in Emscripten (GH-31757)Christian Heimes2022-03-081-3/+7
| | | | | | | | | - getgroups always fails. - geteuid and getegid always return 0 (root), which confuse tarfile and tests. - hardlinks (link, linkat) always fails. - non-encodable file names are not supported by NODERAWFS layer. - mark more tests with dependency on subprocess and multiprocessing. Mocking does not work if the module fails to import.
* bpo-40275: Use new test.support helper submodules in tests (GH-21448)Hai Shi2020-08-031-51/+52
|
* bpo-41069: Make TESTFN and the CWD for tests containing non-ascii ↵Serhiy Storchaka2020-06-251-1/+1
| | | | characters. (GH-21035)
* bpo-35471: Remove the macpath module (GH-11129)Victor Stinner2018-12-141-6/+2
| | | | Python 2.4 dropped MacOS 9 support. The macpath module was deprecated in Python 3.7. This change removes it.
* bpo-33721: Make some os.path functions and pathlib.Path methods be tolerant ↵Serhiy Storchaka2018-09-181-8/+30
| | | | | | | | | | 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.
* bpo-33861: Minor improvements of tests for os.path. (GH-7715)Serhiy Storchaka2018-06-161-30/+51
| | | | | | | | * Test exists(), lexists(), isdir(), isfile(), islink(), ismount() with bytes paths. * Remove unneeded silencing DeprecationWarning for ismount() with bytes path. * Test common functions with unencodable and undecodable paths. * Minor clean up and refactoring.
* bpo-32964: Reuse a testing implementation of the path protocol in tests. (#5930)Serhiy Storchaka2018-03-021-10/+2
|
* bpo-31802: Fix importing native path module before importing os. (#4017)Serhiy Storchaka2018-01-071-0/+4
|
* bpo-28759: Skip some tests on PermissionError raised by Android (GH-4350)xdegaye2017-11-121-5/+8
| | | | | | Access to mkfifo(), mknod() and hard link creation is controled by SELinux on Android. Also remove test.support.android_not_root.
* Issue #28759: Fix the tests that fail with PermissionError when run asXavier de Gaye2016-12-131-0/+3
| | | | a non-root user on Android where access rights are controled by SELinux MAC.
* Fixes tests broken by issue #27781.Steve Dower2016-09-081-1/+4
|
* Issue #26027, #27524: Add PEP 519/__fspath__() support to os andBrett Cannon2016-08-261-10/+54
| | | | | | os.path. Thanks to Jelle Zijlstra for the initial patch against posixmodule.c.
* Issue #13849: Merge from 3.5Berker Peksag2016-07-231-1/+1
|\
| * Issue #13849: Fix test_null_bytes under WindowsBerker Peksag2016-07-231-1/+1
| |
* | Issue #13849: Merge from 3.5Berker Peksag2016-07-231-0/+9
|\ \ | |/
| * Issue #13849: Add tests for null byte checking in test_genericpathBerker Peksag2016-07-231-0/+9
| |
* | Enhance and modernize test_genericpathVictor Stinner2016-03-241-136/+134
|/ | | | | | | | | | | | | | | * Replace "try/finally: os.remove()" with self.addCleanup(support.unlink) or self.addCleanup(support.rmdir): the support function handles the case when the file doesn't exist * Replace "try/finally: f.close()" with "with open(...) as f:" * test_getsize: add a second test with a different size * Create file using "x" mode to ensure that the file didn't exist before, to detect bugs in tests * Open files in unbuffered mode (buferring=0) to write immediatly data on disk * Replace map() with simpler code * Split isdir() unit test into two units tests to make them less dependant, same change for isfile() test * test_samefile(): test also two different files
* Issue #26304: Change "allows to <verb>" to "allows <verb>ing" or similarMartin Panter2016-02-101-1/+1
| | | | | The original form is incorrect grammar and feels awkward, even though the meaning is clear.
* Issue #23780: Improved error message in os.path.join() with single argument.Serhiy Storchaka2015-05-191-0/+4
| | | | Idea by R. David Murray.
* Fixed tests on Windows for issue #21883.Serhiy Storchaka2014-10-041-1/+2
|
* Issue #21883: os.path.join() and os.path.relpath() now raise a TypeError withSerhiy Storchaka2014-10-041-0/+33
| | | | more helpful error message for unsupported or mismatched types of arguments.
* Issue #6815: os.path.expandvars() now supports non-ASCII environmentSerhiy Storchaka2014-02-131-2/+28
|\ | | | | | | variables names and values.
| * Issue #6815: os.path.expandvars() now supports non-ASCII environmentSerhiy Storchaka2014-02-131-2/+28
| | | | | | | | variables names and values.
* | #16852: merge with 3.3.Ezio Melotti2013-01-101-10/+8
|\ \ | |/
| * #16852: test_genericpath, test_posixpath, test_ntpath, and test_macpath now ↵Ezio Melotti2013-01-101-10/+7
| | | | | | | | work with unittest test discovery. Patch by Zachary Ware.
| * (Merge 3.2) Issue #16218, #16414, #16444: Backport FS_NONASCII,Victor Stinner2013-01-031-10/+11
| |\ | | | | | | | | | | | | TESTFN_UNDECODABLE, TESTFN_NONASCII of test.support from Python 3.4. Backport tests on non-ASCII paths.
| | * Issue #16218, #16414, #16444: Backport FS_NONASCII, TESTFN_UNDECODABLE,Victor Stinner2013-01-031-4/+13
| | | | | | | | | | | | | | | TESTFN_NONASCII of test.support from Python 3.4. Backport tests on non-ASCII paths.
* | | Add tests for Issue #10646.Brian Curtin2012-12-261-4/+16
| | | | | | | | | | | | | | | This issue is now fixed due to changes in Issue #11939, so I've refactored the tests to cover the hard link case. There are no code changes here.
* | | Fix #11939. Set st_dev attribute on Windows to simplify os.path.samefile.Brian Curtin2012-12-261-0/+68
| | | | | | | | | | | | | | | | | | By setting the st_dev attribute, we can then remove some Windows-specific code and move os.path.samefile/sameopenfile/samestat to Lib/genericpath.py so all platforms share the same implementation.
* | | Issue #16444, #16218: Use TESTFN_UNDECODABLE on UNIXVictor Stinner2012-11-101-19/+10
| | | | | | | | | | | | | | | | | | | | | | | | Check if data is decoded by os.fsdecode() (filesystem encoding with surrogateescape error handler, PEP 383), not by UTF-8 or the filesystem encoding in strict mode. Use TESTFN_UNDECODABLE in test_cmd_line_script.test_non_ascii() on UNIX.
* | | Issue #16414: Fix support.TESTFN_UNDECODABLE and ↵Victor Stinner2012-11-061-8/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | test_genericpath.test_nonascii_abspath() * support.TESTFN_UNDECODABLE was decodable if the filesystem encoding was cp932 * test_genericpath.test_nonascii_abspath() didn't work on Windows if the path was not decodable (ex: with cp932)
* | | Issue #16414: Add support.FS_NONASCII and support.TESTFN_NONASCIIVictor Stinner2012-11-061-0/+2
| | | | | | | | | | | | | | | These constants are used to test functions with non-ASCII data, especially filenames.
* | | Issue #15441, #15478: Reenable test_nonascii_abspath() on WindowsVictor Stinner2012-10-311-8/+4
|/ / | | | | | | The real bug (issue #15478) has been fixed correctly.
* | Issue #15441: Skip test_nonascii_abspath() of test_genericpath on WindowsVictor Stinner2012-08-011-3/+11
| | | | | | | | if the bytes filenames cannot be encoded from the file system (ANSI) code page
* | Issue #15261: Stop os.stat(fd) crashing on Windows when fd not open.Richard Oudkerk2012-07-061-0/+10
| |
* | Issue #13374: Deprecate os.getcwdb() on WindowsVictor Stinner2011-11-161-2/+4
| |
* | Issue #13374: The Windows bytes API has been deprecated in the os module. UseVictor Stinner2011-11-151-7/+14
|/ | | | | Unicode filenames instead of bytes filenames to not depend on the ANSI code page anymore and to support any filename.
* Merged manually from 2.7 branch to 3.x trunk.Florent Xicluna2010-08-091-0/+3
| | | | | | | | | | | | | | | | | | | | ------------------------------------------------------------------------ r81149 | florent.xicluna | 2010-05-13 23:40:01 +0200 (jeu. 13 mai 2010) | 2 lignes Better test skipping, with message in the log. ------------------------------------------------------------------------ r81150 | florent.xicluna | 2010-05-13 23:41:05 +0200 (jeu. 13 mai 2010) | 2 lignes Improve test feedback to troubleshoot issue #8423 on OS X. ------------------------------------------------------------------------ r81151 | florent.xicluna | 2010-05-14 01:46:48 +0200 (ven. 14 mai 2010) | 2 lignes Revert changeset r81150 which helped diagnose issue #8423 on some OS X buildbot. ------------------------------------------------------------------------ r82056 | florent.xicluna | 2010-06-17 22:30:56 +0200 (jeu. 17 juin 2010) | 2 lignes Add few words about test.test_genericpath.CommonTest ------------------------------------------------------------------------
* #9018: os.path.normcase() now raises a TypeError if the argument is not str ↵Ezio Melotti2010-06-251-8/+12
| | | | or bytes.
* Fix verb tense in skip message.R. David Murray2010-04-221-1/+1
|
* Issue #8422, test_genericpath: skip the creation of a directory with an invalidVictor Stinner2010-04-181-0/+4
| | | | | UTF name on Mac OS X because the OS deny it (the name have to be a valid UTF8 string).
* Fix string-> bytes conversion on backport from 2.x.Florent Xicluna2010-03-081-1/+1
|
* Merge other tests from test_*path.py into test_genericpath.CommonTest, and ↵Florent Xicluna2010-03-081-0/+24
| | | | do some cleanup.
* Merged revisions 78734-78735 via svnmerge fromFlorent Xicluna2010-03-081-96/+188
| | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r78734 | florent.xicluna | 2010-03-06 19:07:18 +0100 (sam, 06 mar 2010) | 2 lines Create test_genericpath.CommonTest and reuse it to test other path modules. ........ r78735 | florent.xicluna | 2010-03-06 19:52:52 +0100 (sam, 06 mar 2010) | 2 lines Minor tweaking of previous r78734, and add a NEWS entry. ........
* Merged revisions 78249 via svnmerge fromEzio Melotti2010-02-201-5/+2
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r78249 | ezio.melotti | 2010-02-20 11:40:07 +0200 (Sat, 20 Feb 2010) | 1 line Remove e assertIs definitions and use correct assert* methods. ........
* convert old fail* assertions to assert*Benjamin Peterson2009-06-301-2/+2
|
* #2621 rename test.test_support to test.supportBenjamin Peterson2008-05-201-46/+46
|
* str/bytes strictness.Guido van Rossum2007-08-271-8/+8
|