Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
9e7990ae
Kaydet (Commit)
9e7990ae
authored
9 years ago
tarafından
Berker Peksag
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Issue #24210: Silence more PendingDeprecationWarning warnings in tests.
üst
b744f3a4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
9 deletions
+31
-9
test_platform.py
Lib/test/test_platform.py
+16
-2
test_ssl.py
Lib/test/test_ssl.py
+15
-7
No files found.
Lib/test/test_platform.py
Dosyayı görüntüle @
9e7990ae
...
...
@@ -236,7 +236,14 @@ class PlatformTest(unittest.TestCase):
self
.
assertEqual
(
sts
,
0
)
def
test_dist
(
self
):
res
=
platform
.
dist
()
with
warnings
.
catch_warnings
():
warnings
.
filterwarnings
(
'ignore'
,
'dist
\
(
\
) and linux_distribution
\
(
\
) '
'functions are deprecated .*'
,
PendingDeprecationWarning
,
)
res
=
platform
.
dist
()
def
test_libc_ver
(
self
):
import
os
...
...
@@ -305,7 +312,14 @@ class PlatformTest(unittest.TestCase):
f
.
write
(
'Fedora release 19 (Schr
\xf6
dinger
\u2019
s Cat)
\n
'
)
with
mock
.
patch
(
'platform._UNIXCONFDIR'
,
tempdir
):
distname
,
version
,
distid
=
platform
.
linux_distribution
()
with
warnings
.
catch_warnings
():
warnings
.
filterwarnings
(
'ignore'
,
'dist
\
(
\
) and linux_distribution
\
(
\
) '
'functions are deprecated .*'
,
PendingDeprecationWarning
,
)
distname
,
version
,
distid
=
platform
.
linux_distribution
()
self
.
assertEqual
(
distname
,
'Fedora'
)
self
.
assertEqual
(
version
,
'19'
)
...
...
This diff is collapsed.
Click to expand it.
Lib/test/test_ssl.py
Dosyayı görüntüle @
9e7990ae
...
...
@@ -3294,18 +3294,26 @@ else:
def
test_main
(
verbose
=
False
):
if
support
.
verbose
:
import
warnings
plats
=
{
'Linux'
:
platform
.
linux_distribution
,
'Mac'
:
platform
.
mac_ver
,
'Windows'
:
platform
.
win32_ver
,
}
for
name
,
func
in
plats
.
items
():
plat
=
func
()
if
plat
and
plat
[
0
]:
plat
=
'
%
s
%
r'
%
(
name
,
plat
)
break
else
:
plat
=
repr
(
platform
.
platform
())
with
warnings
.
catch_warnings
():
warnings
.
filterwarnings
(
'ignore'
,
'dist
\
(
\
) and linux_distribution
\
(
\
) '
'functions are deprecated .*'
,
PendingDeprecationWarning
,
)
for
name
,
func
in
plats
.
items
():
plat
=
func
()
if
plat
and
plat
[
0
]:
plat
=
'
%
s
%
r'
%
(
name
,
plat
)
break
else
:
plat
=
repr
(
platform
.
platform
())
print
(
"test_ssl: testing with
%
r
%
r"
%
(
ssl
.
OPENSSL_VERSION
,
ssl
.
OPENSSL_VERSION_INFO
))
print
(
" under
%
s"
%
plat
)
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment