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
ed483ba6
Kaydet (Commit)
ed483ba6
authored
Mar 24, 2006
tarafından
Neal Norwitz
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
String exceptions are gone and so are classic classes.
üst
28c31982
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
40 deletions
+0
-40
test_pep352.py
Lib/test/test_pep352.py
+0
-40
No files found.
Lib/test/test_pep352.py
Dosyayı görüntüle @
ed483ba6
...
...
@@ -120,22 +120,6 @@ class UsageTests(unittest.TestCase):
def
tearDown
(
self
):
warnings
.
filters
=
self
.
_filters
[:]
def
test_raise_classic
(
self
):
class
ClassicClass
:
pass
try
:
raise
ClassicClass
except
ClassicClass
:
pass
except
:
self
.
fail
(
"unable to raise classic class"
)
try
:
raise
ClassicClass
()
except
ClassicClass
:
pass
except
:
self
.
fail
(
"unable to raise class class instance"
)
def
test_raise_new_style_non_exception
(
self
):
class
NewStyleClass
(
object
):
pass
...
...
@@ -152,32 +136,8 @@ class UsageTests(unittest.TestCase):
except
:
self
.
fail
(
"unable to raise new-style class instance"
)
def
test_raise_string
(
self
):
warnings
.
resetwarnings
()
warnings
.
filterwarnings
(
"error"
)
try
:
raise
"spam"
except
DeprecationWarning
:
pass
except
:
self
.
fail
(
"raising a string did not cause a DeprecationWarning"
)
def
test_catch_string
(
self
):
# Test will be pertinent when catching exceptions raises a
# DeprecationWarning
warnings
.
filterwarnings
(
"ignore"
,
"raising"
)
str_exc
=
"spam"
try
:
raise
str_exc
except
str_exc
:
pass
except
:
self
.
fail
(
"catching a string exception failed"
)
def
test_main
():
run_unittest
(
ExceptionClassTests
,
UsageTests
)
if
__name__
==
'__main__'
:
test_main
()
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