[svn r57536] get the py.path fixes of 0.9.x release branch back to trunk

--HG--
branch : trunk
This commit is contained in:
hpk
2008-08-21 12:00:33 +02:00
parent 5f666c99b7
commit 37a41ed0b7
7 changed files with 20 additions and 11 deletions

View File

@@ -1,4 +1,5 @@
import py
import sys
from py.path import local
from py.__.path.common import checker
from py.__.path.testing.fscommon import CommonFSTests, setuptestfs
@@ -178,6 +179,10 @@ class TestLocalPath(LocalSetup, CommonFSTests):
assert not hasattr(l3, 'commit')
def test_long_filenames(self):
if sys.platform == "win32":
py.test.skip("win32: work around needed for path length limit")
# see http://codespeak.net/pipermail/py-dev/2008q2/000922.html
tmpdir = self.tmpdir
# testing paths > 260 chars (which is Windows' limitation, but
# depending on how the paths are used), but > 4096 (which is the

View File

@@ -29,6 +29,11 @@ class TestWINLocalPath:
t2 = self.root.join("A_path")
assert t1 == t1
assert t1 == t2
def test_relto_with_mixed_case(self):
t1 = self.root.join("a_path", "fiLe")
t2 = self.root.join("A_path")
assert t1.relto(t2) == "fiLe"
def test_allow_unix_style_paths(self):
t1 = self.root.join('a_path')