Hello community,
here is the log from the commit of package python-pytest-socket for
openSUSE:Factory checked in at 2020-06-10 00:49:16
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-pytest-socket (Old)
and /work/SRC/openSUSE:Factory/.python-pytest-socket.new.3606 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-pytest-socket"
Wed Jun 10 00:49:16 2020 rev:3 rq:812807 version:0.3.5
Changes:
--------
---
/work/SRC/openSUSE:Factory/python-pytest-socket/python-pytest-socket.changes
2020-04-14 16:32:16.512149334 +0200
+++
/work/SRC/openSUSE:Factory/.python-pytest-socket.new.3606/python-pytest-socket.changes
2020-06-10 00:49:20.495090243 +0200
@@ -1,0 +2,7 @@
+Tue Jun 9 07:44:50 UTC 2020 - Tomáš Chvátal <[email protected]>
+
+- Update to 0.3.5:
+ * Fix bug in marker evaluation #42
+ * Refactor tests for clarity
+
+-------------------------------------------------------------------
@@ -4 +11 @@
-- Update to 0.4.3:
+- Update to 0.3.4:
Old:
----
pytest-socket-0.3.4.tar.gz
New:
----
pytest-socket-0.3.5.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-pytest-socket.spec ++++++
--- /var/tmp/diff_new_pack.zE2EWD/_old 2020-06-10 00:49:21.263092252 +0200
+++ /var/tmp/diff_new_pack.zE2EWD/_new 2020-06-10 00:49:21.267092262 +0200
@@ -19,7 +19,7 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%define skip_python2 1
Name: python-pytest-socket
-Version: 0.3.4
+Version: 0.3.5
Release: 0
Summary: Pytest Plugin to disable socket
License: MIT
++++++ pytest-socket-0.3.4.tar.gz -> pytest-socket-0.3.5.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-socket-0.3.4/PKG-INFO
new/pytest-socket-0.3.5/PKG-INFO
--- old/pytest-socket-0.3.4/PKG-INFO 2020-04-11 01:11:21.589583900 +0200
+++ new/pytest-socket-0.3.5/PKG-INFO 2020-05-31 17:09:59.277202800 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: pytest-socket
-Version: 0.3.4
+Version: 0.3.5
Summary: Pytest Plugin to disable socket calls during tests
Home-page: https://pypi.org/project/pytest-socket/
License: MIT
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-socket-0.3.4/pyproject.toml
new/pytest-socket-0.3.5/pyproject.toml
--- old/pytest-socket-0.3.4/pyproject.toml 2020-04-11 01:03:01.577754000
+0200
+++ new/pytest-socket-0.3.5/pyproject.toml 2020-05-31 16:57:04.113176300
+0200
@@ -1,6 +1,6 @@
[tool.poetry]
name = "pytest-socket"
-version = "0.3.4"
+version = "0.3.5"
description = "Pytest Plugin to disable socket calls during tests"
authors = ["Mike Fiedler <[email protected]>"]
license = "MIT"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-socket-0.3.4/pytest_socket.py
new/pytest-socket-0.3.5/pytest_socket.py
--- old/pytest-socket-0.3.4/pytest_socket.py 2020-04-11 01:02:31.848008000
+0200
+++ new/pytest-socket-0.3.5/pytest_socket.py 2020-05-31 16:55:04.026533800
+0200
@@ -38,14 +38,21 @@
@pytest.fixture(autouse=True)
def _socket_marker(request):
+ """
+ Create an automatically-used fixture that every test function will load.
+
+ The last option to set the fixture wins priority.
+ The expected behavior is that higher granularity options should override
+ lower granularity options.
+ """
+ if request.config.getoption('--disable-socket'):
+ request.getfixturevalue('socket_disabled')
+
if request.node.get_closest_marker('disable_socket'):
request.getfixturevalue('socket_disabled')
if request.node.get_closest_marker('enable_socket'):
request.getfixturevalue('socket_enabled')
- if request.config.getoption('--disable-socket'):
- request.getfixturevalue('socket_disabled')
-
@pytest.fixture
def socket_disabled():
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pytest-socket-0.3.4/setup.py
new/pytest-socket-0.3.5/setup.py
--- old/pytest-socket-0.3.4/setup.py 2020-04-11 01:11:21.588532000 +0200
+++ new/pytest-socket-0.3.5/setup.py 2020-05-31 17:09:59.276953000 +0200
@@ -11,7 +11,7 @@
setup_kwargs = {
'name': 'pytest-socket',
- 'version': '0.3.4',
+ 'version': '0.3.5',
'description': 'Pytest Plugin to disable socket calls during tests',
'long_description': '=============\npytest-socket\n=============\n\n..
image:: https://img.shields.io/pypi/v/pytest-socket.svg\n :target:
https://pypi.python.org/pypi/pytest-socket\n\n.. image::
https://img.shields.io/pypi/pyversions/pytest-socket.svg\n :target:
https://pypi.python.org/pypi/pytest-socket\n\n.. image::
https://github.com/miketheman/pytest-socket/workflows/Python%20Tests/badge.svg\n
:target:
https://github.com/miketheman/pytest-socket/actions?query=workflow%3A%22Python+Tests%22\n
:alt: Python Tests\n\n.. image::
https://api.codeclimate.com/v1/badges/1608a75b1c3a20211992/maintainability\n
:target:
https://codeclimate.com/github/miketheman/pytest-socket/maintainability\n
:alt: Maintainability\n\n.. image::
https://app.fossa.io/api/projects/git%2Bgithub.com%2Fmiketheman%2Fpytest-socket.svg?type=shield\n
:target:
https://app.fossa.io/projects/git%2Bgithub.com%2Fmiketheman%2Fpytest-socket?ref=badge_shield\n
:alt: FOSSA Status\n\n\nA plugin to use with Pytest to disable or restrict
``socket`` calls during tests to ensure network calls are
prevented.\n\n----\n\nThis `Pytest`_ plugin was generated with `Cookiecutter`_
along with `@hackebrot`_\'s `Cookiecutter-pytest-plugin`_
template.\n\n\nFeatures\n--------\n\n* Disables all network calls flowing
through Python\'s ``socket`` interface.\n\n\nRequirements\n------------\n\n*
`Pytest`_ 3.6.3 or greater\n\n\nInstallation\n------------\n\nYou can install
"pytest-socket" via `pip`_ from `PyPI`_::\n\n $ pip install
pytest-socket\n\n\nUsage\n-----\n\n* Run ``pytest --disable-socket``, tests
should fail on any access to ``socket`` or libraries using\n socket with a
``SocketBlockedError``.\n\n To add this flag as the default behavior, add this
section to your ``pytest.ini`` or ``setup.cfg``:\n\n .. code:: ini\n\n
[pytest]\n addopts = --disable-socket\n\n\n or update your ``conftest.py``
to include:\n\n .. code:: python\n\n from pytest_socket import
disable_socket\n\n def pytest_runtest_setup():\n
disable_socket()\n\n\n* To enable specific tests use of ``socket``, pass in the
fixture to the test or use a marker:\n\n .. code:: python\n\n def
test_explicitly_enable_socket(socket_enabled):\n assert
socket.socket(socket.AF_INET, socket.SOCK_STREAM)\n\n\n
@pytest.mark.enable_socket\n def
test_explicitly_enable_socket_with_mark():\n assert
socket.socket(socket.AF_INET, socket.SOCK_STREAM)\n\n* To allow only specific
hosts per-test:\n\n .. code:: python\n\n
@pytest.mark.allow_hosts([\'127.0.0.1\'])\n def
test_explicitly_enable_socket_with_mark():\n assert
socket.socket.connect((\'127.0.0.1\', 80))\n\nor for whole test run\n\n ..
code:: ini\n\n [pytest]\n addopts =
--allow-hosts=127.0.0.1,127.0.1.1\n\n\nContributing\n------------\nContributions
are very welcome. Tests can be run with `pytest`_, please ensure\nthe coverage
at least stays the same before you submit a pull
request.\n\nLicense\n-------\n\nDistributed under the terms of the `MIT`_
license, "pytest-socket" is free and open source software\n\n.. image::
https://app.fossa.io/api/projects/git%2Bgithub.com%2Fmiketheman%2Fpytest-socket.svg?type=large\n
:target:
https://app.fossa.io/projects/git%2Bgithub.com%2Fmiketheman%2Fpytest-socket?ref=badge_large\n
:alt: FOSSA Status\n\nIssues\n------\n\nIf you encounter any problems,
please `file an issue`_ along with a detailed
description.\n\n\nReferences\n----------\n\nThis plugin came about due to the
efforts by `@hangtwenty`_ solving a `StackOverflow question`_,\nthen converted
into a pytest plugin by `@miketheman`_.\n\n\n.. _`Cookiecutter`:
https://github.com/audreyr/cookiecutter\n.. _`@hackebrot`:
https://github.com/hackebrot\n.. _`MIT`: http://opensource.org/licenses/MIT\n..
_`cookiecutter-pytest-plugin`:
https://github.com/pytest-dev/cookiecutter-pytest-plugin\n.. _`file an issue`:
https://github.com/miketheman/pytest-socket/issues\n.. _`pytest`:
https://github.com/pytest-dev/pytest\n.. _`tox`:
https://tox.readthedocs.io/en/latest/\n.. _`pip`:
https://pypi.python.org/pypi/pip/\n.. _`PyPI`: https://pypi.python.org/pypi\n..
_`@hangtwenty`: https://github.com/hangtwenty\n.. _`StackOverflow question`:
https://stackoverflow.com/a/30064664\n.. _`@miketheman`:
https://github.com/miketheman\n',
'author': 'Mike Fiedler',