1 Star 0 Fork 25

王玺源/python-dns

forked from src-openEuler/python-dns 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
fix-failed-tests.patch 2.08 KB
一键复制 编辑 原始数据 按行查看 历史
eaglegai 提交于 2021-07-07 10:54 . update to 2.1.0
From e691f1219550ccda24276cbfffff5cf0d31d91d1 Mon Sep 17 00:00:00 2001
From: yangl777 <[email protected]>
Date: Tue, 17 Nov 2020 10:36:08 +0800
Subject: [PATCH] fix-failed-tests
---
tests/test_resolver.py | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/tests/test_resolver.py b/tests/test_resolver.py
index 1738c1a..1e0c727 100644
--- a/tests/test_resolver.py
+++ b/tests/test_resolver.py
@@ -31,11 +31,7 @@ from dns._compat import xrange, PY3
# Some tests require the internet to be available to run, so let's
# skip those if it's not there.
-_network_available = True
-try:
- socket.gethostbyname('dnspython.org')
-except socket.gaierror:
- _network_available = False
+_network_available = False
# Some tests use a "nano nameserver" for testing. It requires trio
# and threading, so try to import it and if it doesn't work, skip
diff -ruNa dnspython-2.1.0-org/tests/test_async.py dnspython-2.1.0/tests/test_async.py
--- dnspython-2.1.0-org/tests/test_async.py 2021-07-07 10:04:01.861405149 +0800
+++ dnspython-2.1.0/tests/test_async.py 2021-07-07 10:04:59.981489084 +0800
@@ -41,12 +41,8 @@
# Some tests require the internet to be available to run, so let's
# skip those if it's not there.
-_network_available = True
-try:
- socket.gethostbyname('dnspython.org')
-except socket.gaierror:
- _network_available = False
+_network_available = False
# Probe for IPv4 and IPv6
query_addresses = []
diff -ruNa dnspython-2.1.0-org/tests/test_query.py dnspython-2.1.0/tests/test_query.py
--- dnspython-2.1.0-org/tests/test_query.py 2021-07-07 10:04:01.861405149 +0800
+++ dnspython-2.1.0/tests/test_query.py 2021-07-07 10:05:44.431553273 +0800
@@ -38,11 +38,8 @@
# Some tests require the internet to be available to run, so let's
# skip those if it's not there.
-_network_available = True
-try:
- socket.gethostbyname('dnspython.org')
-except socket.gaierror:
- _network_available = False
+
+_network_available = False
# Some tests use a "nano nameserver" for testing. It requires trio
# and threading, so try to import it and if it doesn't work, skip
--
1.8.3.1
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/xiyuanwang/python-dns.git
[email protected]:xiyuanwang/python-dns.git
xiyuanwang
python-dns
python-dns
master

搜索帮助