From bb0632c7ada7a284bd1ce9fc2eeb3d6d77d6abe4 Mon Sep 17 00:00:00 2001 From: holger krekel Date: Wed, 26 Mar 2014 19:37:49 +0100 Subject: [PATCH] extend test --- testing/python/integration.py | 3 ++- tox.ini | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/testing/python/integration.py b/testing/python/integration.py index e070b4398..b51fc7766 100644 --- a/testing/python/integration.py +++ b/testing/python/integration.py @@ -128,11 +128,12 @@ class TestMockDecoration: 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 --git a/tox.ini b/tox.ini index f56865819..d960cd22b 100644 --- a/tox.ini +++ b/tox.ini @@ -7,6 +7,7 @@ changedir=testing commands= py.test --lsof -rfsxX --junitxml={envlogdir}/junit-{envname}.xml [] deps= nose + mock [testenv:genscript] changedir=.