1 new changeset in pytest:

http://bitbucket.org/hpk42/pytest/changeset/1d393679919d/
changeset:   r2160:1d393679919d
user:        Brianna Laugher
date:        2011-02-18 06:52:18
summary:     Fix mistakes in monkeypatch doc example
affected #:  1 file (10 bytes)

--- a/doc/monkeypatch.txt       Thu Feb 17 14:46:40 2011 +0100
+++ b/doc/monkeypatch.txt       Fri Feb 18 16:52:18 2011 +1100
@@ -24,14 +24,14 @@
 
     import os.path
     def getssh(): # pseudo application code
-        return os.path.join(os.expanduser("~admin"), '.ssh')
+        return os.path.join(os.path.expanduser("~admin"), '.ssh')
 
     def test_mytest(monkeypatch):
         def mockreturn(path):
             return '/abc'
         monkeypatch.setattr(os.path, 'expanduser', mockreturn)
         x = getssh()
-        assert x == '/abc'
+        assert x == '/abc/.ssh'
 
 After the test function finishes the ``os.path.expanduser`` modification
 will be undone.

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

--

This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
_______________________________________________
py-svn mailing list
py-svn@codespeak.net
http://codespeak.net/mailman/listinfo/py-svn

Reply via email to