[py-svn] r10693 - in py/branch/py-collect/path/local: . testing
hpk at codespeak.net
hpk at codespeak.net
Fri Apr 15 18:55:50 CEST 2005
Author: hpk
Date: Fri Apr 15 18:55:50 2005
New Revision: 10693
Modified:
py/branch/py-collect/path/local/local.py
py/branch/py-collect/path/local/testing/test_local.py
Log:
allow to pass in absolute path into sysfind()
Modified: py/branch/py-collect/path/local/local.py
==============================================================================
--- py/branch/py-collect/path/local/local.py (original)
+++ py/branch/py-collect/path/local/local.py Fri Apr 15 18:55:50 2005
@@ -474,7 +474,7 @@
tryadd = ('',)
for x in paths:
for addext in tryadd:
- p = py.path.local(x).join(name) + addext
+ p = py.path.local(x).join(name, abs=True) + addext
if p.check(file=1):
if checker:
if not checker(p):
Modified: py/branch/py-collect/path/local/testing/test_local.py
==============================================================================
--- py/branch/py-collect/path/local/testing/test_local.py (original)
+++ py/branch/py-collect/path/local/testing/test_local.py Fri Apr 15 18:55:50 2005
@@ -149,6 +149,13 @@
py.path.local.sysfind('jaksdkasldqwe')
""")
+ def test_sysfind_absolute(self):
+ x = py.path.local.sysfind('test')
+ assert x.check(file=1)
+ y = py.path.local.sysfind(str(x))
+ assert y.check(file=1)
+ assert y == x
+
def test_sysfind_multiple(self):
dir = py.test.ensuretemp('sysfind')
env = py.std.os.environ
More information about the pytest-commit
mailing list