[py-svn] r64253 - py/dist/py/path/local/testing

afa at codespeak.net afa at codespeak.net
Fri Apr 17 13:18:34 CEST 2009


Author: afa
Date: Fri Apr 17 13:18:33 2009
New Revision: 64253

Modified:
   py/dist/py/path/local/testing/test_local.py
Log:
Add a test for previous change: on Windows, sysfind() also tries the current directory.


Modified: py/dist/py/path/local/testing/test_local.py
==============================================================================
--- py/dist/py/path/local/testing/test_local.py	(original)
+++ py/dist/py/path/local/testing/test_local.py	Fri Apr 17 13:18:33 2009
@@ -199,6 +199,17 @@
         assert x.check(file=1)
         assert py.path.local.sysfind('jaksdkasldqwe') is None
 
+    def test_sysfind_in_currentdir(self):
+        cmd = py.path.local.sysfind('cmd')
+        root = cmd.new(dirname='', basename='') # c:\ in most installations
+
+        old = root.chdir()
+        try:
+            x = py.path.local.sysfind(cmd.relto(root))
+            assert x.check(file=1)
+        finally:
+             old.chdir()
+
 class TestExecution(LocalSetup):
     disabled = py.std.sys.platform == 'win32'
 



More information about the pytest-commit mailing list