Import pytest-mock_1.2.orig.tar.gz
This commit is contained in:
parent
4c5a29cf29
commit
bdae00c258
3
PKG-INFO
3
PKG-INFO
|
@ -1,6 +1,6 @@
|
||||||
Metadata-Version: 1.1
|
Metadata-Version: 1.1
|
||||||
Name: pytest-mock
|
Name: pytest-mock
|
||||||
Version: 1.1
|
Version: 1.2
|
||||||
Summary: Thin-wrapper around the mock package for easier use with py.test
|
Summary: Thin-wrapper around the mock package for easier use with py.test
|
||||||
Home-page: https://github.com/pytest-dev/pytest-mock/
|
Home-page: https://github.com/pytest-dev/pytest-mock/
|
||||||
Author: Bruno Oliveira
|
Author: Bruno Oliveira
|
||||||
|
@ -77,6 +77,7 @@ Description: ===========
|
||||||
* `PropertyMock <https://docs.python.org/3/library/unittest.mock.html#unittest.mock.PropertyMock>`_
|
* `PropertyMock <https://docs.python.org/3/library/unittest.mock.html#unittest.mock.PropertyMock>`_
|
||||||
* `ANY <https://docs.python.org/3/library/unittest.mock.html#any>`_
|
* `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)*
|
* `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
|
Spy
|
||||||
|
|
|
@ -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>`_
|
* `PropertyMock <https://docs.python.org/3/library/unittest.mock.html#unittest.mock.PropertyMock>`_
|
||||||
* `ANY <https://docs.python.org/3/library/unittest.mock.html#any>`_
|
* `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)*
|
* `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
|
Spy
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
Metadata-Version: 1.1
|
Metadata-Version: 1.1
|
||||||
Name: pytest-mock
|
Name: pytest-mock
|
||||||
Version: 1.1
|
Version: 1.2
|
||||||
Summary: Thin-wrapper around the mock package for easier use with py.test
|
Summary: Thin-wrapper around the mock package for easier use with py.test
|
||||||
Home-page: https://github.com/pytest-dev/pytest-mock/
|
Home-page: https://github.com/pytest-dev/pytest-mock/
|
||||||
Author: Bruno Oliveira
|
Author: Bruno Oliveira
|
||||||
|
@ -77,6 +77,7 @@ Description: ===========
|
||||||
* `PropertyMock <https://docs.python.org/3/library/unittest.mock.html#unittest.mock.PropertyMock>`_
|
* `PropertyMock <https://docs.python.org/3/library/unittest.mock.html#unittest.mock.PropertyMock>`_
|
||||||
* `ANY <https://docs.python.org/3/library/unittest.mock.html#any>`_
|
* `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)*
|
* `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
|
Spy
|
||||||
|
|
|
@ -1,14 +1,13 @@
|
||||||
import inspect
|
import inspect
|
||||||
import sys
|
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
if sys.version_info >= (3, 3): # pragma: no cover
|
try:
|
||||||
import unittest.mock as mock_module
|
|
||||||
else:
|
|
||||||
import mock as mock_module
|
import mock as mock_module
|
||||||
|
except ImportError:
|
||||||
|
import unittest.mock as mock_module
|
||||||
|
|
||||||
version = '1.1'
|
version = '1.2'
|
||||||
|
|
||||||
|
|
||||||
class MockFixture(object):
|
class MockFixture(object):
|
||||||
|
@ -22,6 +21,7 @@ class MockFixture(object):
|
||||||
PropertyMock = mock_module.PropertyMock
|
PropertyMock = mock_module.PropertyMock
|
||||||
call = mock_module.call
|
call = mock_module.call
|
||||||
ANY = mock_module.ANY
|
ANY = mock_module.ANY
|
||||||
|
sentinel = mock_module.sentinel
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
self._patches = [] # list of mock._patch objects
|
self._patches = [] # list of mock._patch objects
|
||||||
|
|
|
@ -132,7 +132,7 @@ def test_deprecated_mock(mock, tmpdir):
|
||||||
assert os.listdir(str(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):
|
def test_mocker_aliases(name):
|
||||||
from pytest_mock import mock_module, MockFixture
|
from pytest_mock import mock_module, MockFixture
|
||||||
|
|
||||||
|
@ -455,7 +455,7 @@ def test_monkeypatch_ini(mocker, testdir):
|
||||||
assert result.ret == 0
|
assert result.ret == 0
|
||||||
|
|
||||||
|
|
||||||
def test_parse_ini_boolean(testdir):
|
def test_parse_ini_boolean():
|
||||||
import pytest_mock
|
import pytest_mock
|
||||||
assert pytest_mock.parse_ini_boolean('True') is True
|
assert pytest_mock.parse_ini_boolean('True') is True
|
||||||
assert pytest_mock.parse_ini_boolean('false') is False
|
assert pytest_mock.parse_ini_boolean('false') is False
|
||||||
|
|
Loading…
Reference in a new issue