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
6bcbad5f
Kaydet (Commit)
6bcbad5f
authored
Haz 30, 2009
tarafından
Benjamin Peterson
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
test that depreacted methods give warnings
üst
e1759f8d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
7 deletions
+15
-7
test_unittest.py
Lib/test/test_unittest.py
+15
-7
No files found.
Lib/test/test_unittest.py
Dosyayı görüntüle @
6bcbad5f
...
@@ -9,6 +9,7 @@ Still need testing:
...
@@ -9,6 +9,7 @@ Still need testing:
import
os
import
os
import
re
import
re
import
sys
import
sys
import
warnings
from
test
import
support
from
test
import
support
import
unittest
import
unittest
from
unittest
import
TestCase
,
TestProgram
from
unittest
import
TestCase
,
TestProgram
...
@@ -2810,13 +2811,20 @@ test case
...
@@ -2810,13 +2811,20 @@ test case
Do not use these methods. They will go away in 3.3.
Do not use these methods. They will go away in 3.3.
"""
"""
self
.
failIfEqual
(
3
,
5
)
old
=
(
self
.
failUnlessEqual
(
3
,
3
)
(
self
.
failIfEqual
,
(
3
,
5
)),
self
.
failUnlessAlmostEqual
(
2.0
,
2.0
)
(
self
.
failUnlessEqual
,
(
3
,
3
)),
self
.
failIfAlmostEqual
(
3.0
,
5.0
)
(
self
.
failUnlessAlmostEqual
,
(
2.0
,
2.0
)),
self
.
failUnless
(
True
)
(
self
.
failIfAlmostEqual
,
(
3.0
,
5.0
)),
self
.
failUnlessRaises
(
TypeError
,
lambda
_
:
3.14
+
'spam'
)
(
self
.
failUnless
,
(
True
,)),
self
.
failIf
(
False
)
(
self
.
failUnlessRaises
,
(
TypeError
,
lambda
_
:
3.14
+
'spam'
)),
(
self
.
failIf
,
(
False
,))
)
for
meth
,
args
in
old
:
with
warnings
.
catch_warnings
(
record
=
True
)
as
w
:
meth
(
*
args
)
self
.
assertEqual
(
len
(
w
),
1
)
self
.
assertIs
(
w
[
0
]
.
category
,
DeprecationWarning
)
def
testDeepcopy
(
self
):
def
testDeepcopy
(
self
):
# Issue: 5660
# Issue: 5660
...
...
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