Skip to content

Commit

Permalink
Apply pre-commit changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Stanislav Tkachenko authored and Stranger6667 committed Jan 7, 2020
1 parent 6d26e18 commit 1f27ef4
Show file tree
Hide file tree
Showing 12 changed files with 12 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .coveragerc
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ source =

[report]
show_missing = true
precision = 2
precision = 2
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,4 @@ before_cache:
- rm -rf $HOME/.cache/pip/log

after_success:
- codecov
- codecov
2 changes: 1 addition & 1 deletion CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,4 +73,4 @@ available at <https://www.contributor-covenant.org/version/1/4/code-of-conduct.h
[homepage]: https://www.contributor-covenant.org

For answers to common questions about this code of conduct, see
<https://www.contributor-covenant.org/faq>
<https://www.contributor-covenant.org/faq>
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
THE SOFTWARE.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@ release: build
twine check dist/*
twine upload dist/*

.PHONY: test black install build release
.PHONY: test black install build release
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ line_length = 120
multi_line_output = 3
default_sectiont = "THIRDPARTY"
include_trailing_comma = true
known_third_party = ["attr", "pluggy", "pytest", "pytest_recording", "setuptools", "vcr"]
known_third_party = ["attr", "pytest", "pytest_recording", "setuptools", "vcr"]
6 changes: 4 additions & 2 deletions src/pytest_recording/network.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@
import sys
from contextlib import contextmanager

import attr

try:
from urllib.parse import urlparse
except ImportError:
from urlparse import urlparse

import attr

try:
import pycurl
Expand Down Expand Up @@ -146,9 +147,10 @@ def unblock():
def blocking_context(allowed_hosts=None):
"""Block connections via socket and pycurl.
NOTE:
Note:
Only connections to remotes are blocked in `socket`.
Local servers are not touched since it could interfere with live servers needed for tests (e.g. pytest-httpbin)
"""
block(allowed_hosts=allowed_hosts)
try:
Expand Down
2 changes: 1 addition & 1 deletion tests/test_blocking_network.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ def test_no_vcr_mark(httpbin):
@pytest.mark.parametrize(
"marker, cmd_options",
(
pytest.param('@pytest.mark.block_network(allowed_hosts=["127.0.0.*", "127.0.1.1"])', "", id="block_marker",),
pytest.param('@pytest.mark.block_network(allowed_hosts=["127.0.0.*", "127.0.1.1"])', "", id="block_marker"),
pytest.param("", ("--block-network", "--allowed-hosts=127.0.0.*,127.0.1.1"), id="block_cmd"),
),
)
Expand Down
2 changes: 0 additions & 2 deletions tests/test_plugin.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# -*- coding: utf-8 -*-
import pytest
from pluggy.manager import PluginManager

from pytest_recording.plugin import RECORD_MODES


Expand Down
1 change: 0 additions & 1 deletion tests/test_replaying.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import pytest

from pytest_recording._vcr import load_cassette


Expand Down
1 change: 0 additions & 1 deletion tests/test_utils.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import pytest

from pytest_recording.utils import unique


Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,4 @@ skip_install = true
depends = {py27,py35,py36,py37,py38,pypy,pypy3}
commands =
coverage combine
coverage report
coverage report

0 comments on commit 1f27ef4

Please sign in to comment.