From e3a2db943057251e87fe71f8aecfde543ef5c033 Mon Sep 17 00:00:00 2001 From: deeenes Date: Wed, 4 Oct 2023 01:28:59 +0200 Subject: [PATCH] tests work only offline, use `pytest-socket` to make sure no networking happens --- tests/conftest.py | 3 +++ tox.ini | 2 ++ 2 files changed, 5 insertions(+) diff --git a/tests/conftest.py b/tests/conftest.py index 9c19c03..cd8c7d2 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -11,6 +11,9 @@ import pickle import logging +from pytest_socket import disable_socket + +disable_socket() import pytest import requests diff --git a/tox.ini b/tox.ini index 378b11a..4021d18 100644 --- a/tox.ini +++ b/tox.ini @@ -4,6 +4,7 @@ per-file-ignores = */__init__.py: D104, F401, tests/* : D101, D102, D103, D104 + tests/conftest.py: D101, D102, D103, E402 # D100 Missing docstring in public module # D107 Missing docstring in __init__ # W503 line break before binary operator @@ -58,6 +59,7 @@ deps = pytest pytest-mock pytest-cov + pytest-socket requests-mock>=1.9.2 numpy networkx