Import pytest-mock_1.2.orig.tar.gz

This commit is contained in:
Vincent Bernat 2016-09-03 12:31:16 +02:00
parent 4c5a29cf29
commit bdae00c258
5 changed files with 12 additions and 9 deletions

View file

@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: pytest-mock
Version: 1.1
Version: 1.2
Summary: Thin-wrapper around the mock package for easier use with py.test
Home-page: https://github.com/pytest-dev/pytest-mock/
Author: Bruno Oliveira
@ -77,6 +77,7 @@ Description: ===========
* `PropertyMock <https://docs.python.org/3/library/unittest.mock.html#unittest.mock.PropertyMock>`_
* `ANY <https://docs.python.org/3/library/unittest.mock.html#any>`_
* `call <https://docs.python.org/3/library/unittest.mock.html#call>`_ *(Version 1.1)*
* `sentinel <https://docs.python.org/3/library/unittest.mock.html#sentinel>`_ *(Version 1.2)*
Spy

View file

@ -69,6 +69,7 @@ Some objects from the ``mock`` module are accessible directly from ``mocker`` fo
* `PropertyMock <https://docs.python.org/3/library/unittest.mock.html#unittest.mock.PropertyMock>`_
* `ANY <https://docs.python.org/3/library/unittest.mock.html#any>`_
* `call <https://docs.python.org/3/library/unittest.mock.html#call>`_ *(Version 1.1)*
* `sentinel <https://docs.python.org/3/library/unittest.mock.html#sentinel>`_ *(Version 1.2)*
Spy

View file

@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: pytest-mock
Version: 1.1
Version: 1.2
Summary: Thin-wrapper around the mock package for easier use with py.test
Home-page: https://github.com/pytest-dev/pytest-mock/
Author: Bruno Oliveira
@ -77,6 +77,7 @@ Description: ===========
* `PropertyMock <https://docs.python.org/3/library/unittest.mock.html#unittest.mock.PropertyMock>`_
* `ANY <https://docs.python.org/3/library/unittest.mock.html#any>`_
* `call <https://docs.python.org/3/library/unittest.mock.html#call>`_ *(Version 1.1)*
* `sentinel <https://docs.python.org/3/library/unittest.mock.html#sentinel>`_ *(Version 1.2)*
Spy

View file

@ -1,14 +1,13 @@
import inspect
import sys
import pytest
if sys.version_info >= (3, 3): # pragma: no cover
import unittest.mock as mock_module
else:
try:
import mock as mock_module
except ImportError:
import unittest.mock as mock_module
version = '1.1'
version = '1.2'
class MockFixture(object):
@ -22,6 +21,7 @@ class MockFixture(object):
PropertyMock = mock_module.PropertyMock
call = mock_module.call
ANY = mock_module.ANY
sentinel = mock_module.sentinel
def __init__(self):
self._patches = [] # list of mock._patch objects

View file

@ -132,7 +132,7 @@ def test_deprecated_mock(mock, tmpdir):
assert os.listdir(str(tmpdir)) == []
@pytest.mark.parametrize('name', ['MagicMock', 'PropertyMock', 'Mock', 'call', 'ANY'])
@pytest.mark.parametrize('name', ['MagicMock', 'PropertyMock', 'Mock', 'call', 'ANY', 'sentinel'])
def test_mocker_aliases(name):
from pytest_mock import mock_module, MockFixture
@ -455,7 +455,7 @@ def test_monkeypatch_ini(mocker, testdir):
assert result.ret == 0
def test_parse_ini_boolean(testdir):
def test_parse_ini_boolean():
import pytest_mock
assert pytest_mock.parse_ini_boolean('True') is True
assert pytest_mock.parse_ini_boolean('false') is False