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
26e5341c
Kaydet (Commit)
26e5341c
authored
Ara 29, 2001
tarafından
Neal Norwitz
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
SF Patch #494876, test invalid parameters to pow()
üst
f21b2aaf
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
0 deletions
+20
-0
test_b2.py
Lib/test/test_b2.py
+20
-0
No files found.
Lib/test/test_b2.py
Dosyayı görüntüle @
26e5341c
...
@@ -105,6 +105,26 @@ for x in 2, 2L, 2.0:
...
@@ -105,6 +105,26 @@ for x in 2, 2L, 2.0:
if
fcmp
(
pow
(
x
,
y
,
z
),
24.0
):
if
fcmp
(
pow
(
x
,
y
,
z
),
24.0
):
raise
TestFailed
,
'pow(
%
s,
%
s,
%
s)'
%
(
x
,
y
,
z
)
raise
TestFailed
,
'pow(
%
s,
%
s,
%
s)'
%
(
x
,
y
,
z
)
try
:
pow
(
-
1
,
-
2
,
3
)
except
TypeError
:
pass
else
:
raise
TestFailed
,
'pow(1, -2, 3) should raise TypeError'
try
:
pow
(
1
,
2
,
0
)
except
ValueError
:
pass
else
:
raise
TestFailed
,
'pow(1, 2, 0) should raise ValueError'
try
:
pow
(
-
1L
,
-
2L
,
3L
)
except
TypeError
:
pass
else
:
raise
TestFailed
,
'pow(1L, -2L, 3L) should raise TypeError'
try
:
pow
(
1L
,
2L
,
0L
)
except
ValueError
:
pass
else
:
raise
TestFailed
,
'pow(1L, 2L, 0L) should raise ValueError'
try
:
pow
(
-
342.43
,
0.234
)
except
ValueError
:
pass
else
:
raise
TestFailed
,
'pow(-342.43, 0.234) should raise ValueError'
print
'range'
print
'range'
if
range
(
3
)
!=
[
0
,
1
,
2
]:
raise
TestFailed
,
'range(3)'
if
range
(
3
)
!=
[
0
,
1
,
2
]:
raise
TestFailed
,
'range(3)'
if
range
(
1
,
5
)
!=
[
1
,
2
,
3
,
4
]:
raise
TestFailed
,
'range(1, 5)'
if
range
(
1
,
5
)
!=
[
1
,
2
,
3
,
4
]:
raise
TestFailed
,
'range(1, 5)'
...
...
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