[Pytest-commit] commit/py: 2 new changesets

commits-noreply at bitbucket.org commits-noreply at bitbucket.org
Mon Jul 14 22:01:01 CEST 2014


2 new commits in py:

https://bitbucket.org/hpk42/py/commits/d63b6afbc3c9/
Changeset:   d63b6afbc3c9
User:        hpk42
Date:        2014-07-14 15:09:48
Summary:     we have to clear up some global state.
Affected #:  1 file

diff -r a990113bb086420f36489082fdc5220f46c6f8d0 -r d63b6afbc3c9af45d7755ca06bb2a1537f6b4683 testing/process/test_forkedfunc.py
--- a/testing/process/test_forkedfunc.py
+++ b/testing/process/test_forkedfunc.py
@@ -1,7 +1,13 @@
+import pytest
 import py, sys, os
 
 pytestmark = py.test.mark.skipif("not hasattr(os, 'fork')")
 
+ at pytest.fixture(autouse=True)
+def clear_forkedfunc(monkeypatch):
+    monkeypatch.setattr(py.process.ForkedFunc, "_on_start", [])
+    monkeypatch.setattr(py.process.ForkedFunc, "_on_exit", [])
+
 def test_waitfinish_removes_tempdir():
     ff = py.process.ForkedFunc(boxf1)
     assert ff.tempdir.check()


https://bitbucket.org/hpk42/py/commits/5e48016c4a3a/
Changeset:   5e48016c4a3a
User:        hpk42
Date:        2014-07-14 14:55:06
Summary:     win32: py.path.local.sysfind(name) will preferrably return files with
extensions so that if "X" and "X.bat" or "X.exe" is on the PATH,
one of the latter two will be returned.
Affected #:  5 files

diff -r d63b6afbc3c9af45d7755ca06bb2a1537f6b4683 -r 5e48016c4a3af8e7358a1267d33d021e71765bed CHANGELOG
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,4 +1,4 @@
-1.4.X
+1.4.21
 ==================================================
 
 - ForkedFunc now has class-level register_on_start/on_exit()
@@ -14,6 +14,10 @@
   on a per-entry basis such that a caller can force entries to be 
   isplayed as short or long entries.
 
+- win32: py.path.local.sysfind(name) will preferrably return files with
+  extensions so that if "X" and "X.bat" or "X.exe" is on the PATH,
+  one of the latter two will be returned.
+
 1.4.20
 ==================================================
 

diff -r d63b6afbc3c9af45d7755ca06bb2a1537f6b4683 -r 5e48016c4a3af8e7358a1267d33d021e71765bed py/__init__.py
--- a/py/__init__.py
+++ b/py/__init__.py
@@ -8,7 +8,7 @@
 
 (c) Holger Krekel and others, 2004-2013
 """
-__version__ = '1.4.21.dev3'
+__version__ = '1.4.21'
 
 from py import _apipkg
 

diff -r d63b6afbc3c9af45d7755ca06bb2a1537f6b4683 -r 5e48016c4a3af8e7358a1267d33d021e71765bed py/_path/local.py
--- a/py/_path/local.py
+++ b/py/_path/local.py
@@ -700,9 +700,10 @@
                                  for path in paths]
                 else:
                     paths = py.std.os.environ['PATH'].split(':')
-            tryadd = ['']
+            tryadd = []
             if iswin32:
                 tryadd += os.environ['PATHEXT'].split(os.pathsep)
+            tryadd.append("")
 
             for x in paths:
                 for addext in tryadd:

diff -r d63b6afbc3c9af45d7755ca06bb2a1537f6b4683 -r 5e48016c4a3af8e7358a1267d33d021e71765bed setup.py
--- a/setup.py
+++ b/setup.py
@@ -7,7 +7,7 @@
         name='py',
         description='library with cross-python path, ini-parsing, io, code, log facilities',
         long_description = open('README.txt').read(),
-        version='1.4.21.dev3',
+        version='1.4.21',
         url='http://pylib.readthedocs.org/',
         license='MIT license',
         platforms=['unix', 'linux', 'osx', 'cygwin', 'win32'],

diff -r d63b6afbc3c9af45d7755ca06bb2a1537f6b4683 -r 5e48016c4a3af8e7358a1267d33d021e71765bed testing/path/test_local.py
--- a/testing/path/test_local.py
+++ b/testing/path/test_local.py
@@ -295,6 +295,14 @@
 class TestExecutionOnWindows:
     pytestmark = win32only
 
+    def test_sysfind_bat_exe_before(self, tmpdir, monkeypatch):
+        monkeypatch.setenv("PATH", str(tmpdir), prepend=os.pathsep)
+        tmpdir.ensure("hello")
+        h = tmpdir.ensure("hello.bat")
+        x = py.path.local.sysfind("hello")
+        assert x == h
+
+
 class TestExecution:
     pytestmark = skiponwin32

Repository URL: https://bitbucket.org/hpk42/py/

--

This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.


More information about the pytest-commit mailing list