Commit Graph

35 Commits

Author SHA1 Message Date
Hirokazu Yamamoto 50f7d7e213 Issue #5117: Fixed root directory related issue on posixpath.relpath() and
ntpath.relpath().
2010-10-18 13:55:29 +00:00
Florent Xicluna 985478dbbb Minor tweaking of previous r78734, and add a NEWS entry. 2010-03-06 18:52:52 +00:00
Florent Xicluna dc1531c5c4 Create test_genericpath.CommonTest and reuse it to test other path modules. 2010-03-06 18:07:18 +00:00
Ezio Melotti 9e9af21d45 skip tests with a non-ascii cwd when the file system encoding is ascii 2010-02-20 22:34:21 +00:00
Ezio Melotti e3467d5c96 Remove e assertIs definitions and use correct assert* methods. 2010-02-20 09:40:07 +00:00
Ezio Melotti 4cc80ca921 #3426: os.path.abspath now returns unicode when its arg is unicode. 2010-02-20 08:09:39 +00:00
Georg Brandl b86d3fa43c Remove duplicate test method. 2010-02-07 12:55:12 +00:00
Ezio Melotti b0f5adc3f4 use assert[Not]IsInstance where appropriate 2010-01-24 16:58:36 +00:00
Ezio Melotti b5689de044 #5827: make sure that normpath preserves unicode 2010-01-12 03:32:05 +00:00
Benjamin Peterson 5c8da86f3a convert usage of fail* to assert* 2009-06-30 22:57:08 +00:00
Walter Dörwald 6733bed57e Make test.test_support.EnvironmentVarGuard behave like a dictionary.
All changes are mirrored to the underlying os.environ dict, but rolled back
on exit from the with block.
2009-05-01 17:35:37 +00:00
Walter Dörwald 4b965f6ab1 Use test.test_support.EnvironmentVarGuard where tests change environment vars. 2009-04-26 20:51:44 +00:00
Georg Brandl 3f0ef20269 #5471: fix expanduser() for $HOME set to "/". 2009-04-05 14:48:49 +00:00
Georg Brandl 183a084da3 #1742: don't raise exception on os.path.relpath("a", "a"), but return os.curdir.
Reported by Jesse Towner.
2008-01-06 14:27:15 +00:00
Raymond Hettinger a74b67e15e Better tests for posixpath.commonprefix 2007-05-11 17:59:59 +00:00
Collin Winter 75c7eb4fd8 Make test_relpath() pass on Windows. 2007-03-23 22:24:39 +00:00
Collin Winter 6f187743ff Patch 1339796: add a relpath() function to os.path. 2007-03-16 22:16:08 +00:00
Tim Peters ea5962f86e Whitespace normalization. 2007-03-12 18:07:52 +00:00
Collin Winter dbead56cb6 * Unlink test files before and after each test; hopefully this will cut down on recent buildbot failures in test_islink.
* Drop safe_remove() in favor of test_support.unlink().
* Fix the indentation of test_samefile so that it runs.
2007-03-10 02:23:40 +00:00
Martin v. Löwis 05c075d629 Bug #1115886: os.path.splitext('.cshrc') gives now ('.cshrc', ''). 2007-03-07 11:04:33 +00:00
Sjoerd Mullender 33a0a06d31 Fixed ntpath.expandvars to not replace references to non-existing
variables with nothing.  Also added tests.
This fixes bug #494589.
2007-01-16 16:42:38 +00:00
Tim Peters 5d36a55eaa Whitespace normalization. 2005-06-03 22:40:27 +00:00
Georg Brandl 268e61cf74 Bug #1213894: os.path.realpath didn't resolve symlinks that were the first
component of the path.
2005-06-03 14:28:50 +00:00
Johannes Gijsbers ae882f7984 Patch #941486: add os.path.lexists(). Also fix bug #940578 by using lexists in glob.glob. 2004-08-30 10:19:56 +00:00
Tim Peters a45cacfc1c Whitespace normalization. 2004-08-20 03:47:14 +00:00
Johannes Gijsbers 4ec40648a5 bug #990669: os.path.realpath() will resolve symlinks before normalizing the
path, as normalizing the path may alter the meaning of the path if it contains
symlinks.

Also add tests for infinite symlink loops and parent symlinks that need to be
resolved.
2004-08-14 15:01:53 +00:00
Neal Norwitz 168e73d25e Fix SF #763362, test_posixpath failed
Don't check expanduser('~') if the home directory == the root directory
(ie, we are running as root).
2003-07-01 03:33:31 +00:00
Tim Peters 478c10554b Whitespace normalization. 2003-06-29 05:46:54 +00:00
Walter Dörwald a9da5ae07a Use find() instead of looping over the string in expanduser().
From SF patch #757058.
2003-06-19 10:21:14 +00:00
Brett Cannon b47243ae45 Complete rewrite of tests by Walter Dorwald as unittest tests. 2003-06-16 21:54:50 +00:00
Martin v. Löwis de3337913f Patch #536661: Improve performance of splitext. Add test_macpath. 2002-12-12 20:30:20 +00:00
Eric S. Raymond 2846b0ab41 String method conversion.
(This one was trivial -- no actual string. references in it!)
2001-02-09 12:00:47 +00:00
Fred Drake 004d5e6880 Make reindent.py happy (convert everything to 4-space indents!). 2000-10-23 17:22:08 +00:00
Skip Montanaro 533bc9ad42 updated to correct failing test cases 2000-08-23 16:51:56 +00:00
Skip Montanaro e809b00f36 new test file for posixpath module 2000-07-12 00:20:08 +00:00