!19 fix failed tests
Merge pull request !19 from quanhongfei/openEuler-22.03-LTS-Next
This commit is contained in:
commit
7bdb6fcf9e
@ -24,6 +24,22 @@ index 1738c1a..1e0c727 100644
|
|||||||
|
|
||||||
# Some tests use a "nano nameserver" for testing. It requires trio
|
# 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
|
# and threading, so try to import it and if it doesn't work, skip
|
||||||
|
diff -ruNa dnspython-2.1.0-org/tests/test_resolver_override.py dnspython-2.1.0/tests/test_resolver_override.py
|
||||||
|
--- dnspython-2.1.0-org/tests/test_resolver_override.py 2021-07-07 10:04:01.861405149 +0800
|
||||||
|
+++ dnspython-2.1.0/tests/test_resolver_override.py 2021-07-07 10:04:59.981489084 +0800
|
||||||
|
@@ -11,11 +11,7 @@ import dns.resolver
|
||||||
|
|
||||||
|
# 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
|
||||||
|
|
||||||
|
|
||||||
|
@unittest.skipIf(not _network_available, "Internet not reachable")
|
||||||
diff -ruNa dnspython-2.1.0-org/tests/test_async.py dnspython-2.1.0/tests/test_async.py
|
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-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
|
+++ dnspython-2.1.0/tests/test_async.py 2021-07-07 10:04:59.981489084 +0800
|
||||||
|
|||||||
@ -14,7 +14,7 @@ messages, names, and records.
|
|||||||
Name: python-dns
|
Name: python-dns
|
||||||
Summary: %{sum}
|
Summary: %{sum}
|
||||||
Version: 2.1.0
|
Version: 2.1.0
|
||||||
Release: 1
|
Release: 2
|
||||||
License: ISC and MIT
|
License: ISC and MIT
|
||||||
URL: http://www.dnspython.org/
|
URL: http://www.dnspython.org/
|
||||||
Source0: https://github.com/rthalley/dnspython/archive/v%{version}/dnspython-%{version}.tar.gz
|
Source0: https://github.com/rthalley/dnspython/archive/v%{version}/dnspython-%{version}.tar.gz
|
||||||
@ -61,6 +61,9 @@ pytest
|
|||||||
%doc examples
|
%doc examples
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Sat Jan 08 2022 quanhongfei<quanhongfei@huawei.com> - 2.1.0-2
|
||||||
|
- fix tests failed
|
||||||
|
|
||||||
* Fri Dec 10 2021 gaihuiying<gaihuiying1@huawei.com> - 2.1.0-1
|
* Fri Dec 10 2021 gaihuiying<gaihuiying1@huawei.com> - 2.1.0-1
|
||||||
- update to 2.1.0
|
- update to 2.1.0
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user