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

commits-noreply at bitbucket.org commits-noreply at bitbucket.org
Wed Mar 26 19:37:58 CET 2014


2 new commits in pytest:

https://bitbucket.org/hpk42/pytest/commits/29366ebd2c3c/
Changeset:   29366ebd2c3c
User:        hpk42
Date:        2014-03-26 19:06:56
Summary:     add changelog: merge PR123: improved integration with mock.patch decorator on tests.
Affected #:  2 files

diff -r 9f5aad82d1cf661b9a5b6ddfeb1ca945b3bd21de -r 29366ebd2c3c4c201689fbd97ea5cb3b4f41103a AUTHORS
--- a/AUTHORS
+++ b/AUTHORS
@@ -39,3 +39,4 @@
 Piotr Banaszkiewicz
 Jurko Gospodnetić
 Marc Schlaich
+Christopher Gilling

diff -r 9f5aad82d1cf661b9a5b6ddfeb1ca945b3bd21de -r 29366ebd2c3c4c201689fbd97ea5cb3b4f41103a CHANGELOG
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -21,6 +21,8 @@
 - fix issue472: clarify that ``pytest.config.getvalue()`` cannot work
   if it's triggered ahead of command line parsing.
 
+- merge PR123: improved integration with mock.patch decorator on tests.
+
 
 2.5.2
 -----------------------------------


https://bitbucket.org/hpk42/pytest/commits/f730b565779a/
Changeset:   f730b565779a
User:        hpk42
Date:        2014-03-26 19:37:49
Summary:     extend test
Affected #:  2 files

diff -r 29366ebd2c3c4c201689fbd97ea5cb3b4f41103a -r f730b565779adea665f10e678baee02687f1a3df testing/python/integration.py
--- a/testing/python/integration.py
+++ b/testing/python/integration.py
@@ -128,11 +128,12 @@
                 return "mock_basename"
             @mock.patch("os.path.abspath")
             @mock.patch("os.path.normpath")
-            @mock.patch("os.path.basename",new=mock_basename)
+            @mock.patch("os.path.basename", new=mock_basename)
             def test_someting(normpath, abspath, tmpdir):
                 abspath.return_value = "this"
                 os.path.normpath(os.path.abspath("hello"))
                 normpath.assert_any_call("this")
+                assert os.path.basename("123") == "mock_basename"
         """)
         reprec = testdir.inline_run()
         reprec.assertoutcome(passed=2)

diff -r 29366ebd2c3c4c201689fbd97ea5cb3b4f41103a -r f730b565779adea665f10e678baee02687f1a3df tox.ini
--- a/tox.ini
+++ b/tox.ini
@@ -7,6 +7,7 @@
 commands= py.test --lsof -rfsxX --junitxml={envlogdir}/junit-{envname}.xml []
 deps=
     nose
+    mock
 
 [testenv:genscript]
 changedir=.

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.


More information about the pytest-commit mailing list