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
6d30c3e3
Kaydet (Commit)
6d30c3e3
authored
Ara 05, 2001
tarafından
Tim Peters
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Change new tests to use integer division (// instead of /).
üst
a3c01ce6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
test_types.py
Lib/test/test_types.py
+3
-3
No files found.
Lib/test/test_types.py
Dosyayı görüntüle @
6d30c3e3
...
...
@@ -74,7 +74,7 @@ if not (xsize*ysize*zsize == zsize*xsize*ysize == 338912):
# And another.
m
=
-
sys
.
maxint
-
1
for
divisor
in
1
,
2
,
4
,
8
,
16
,
32
:
j
=
m
/
divisor
j
=
m
/
/
divisor
prod
=
divisor
*
j
if
prod
!=
m
:
raise
TestFailed
,
"
%
r *
%
r ==
%
r !=
%
r"
%
(
divisor
,
j
,
prod
,
m
)
...
...
@@ -83,7 +83,7 @@ for divisor in 1, 2, 4, 8, 16, 32:
type
(
prod
))
# Check for expected * overflow to long.
for
divisor
in
1
,
2
,
4
,
8
,
16
,
32
:
j
=
m
/
divisor
-
1
j
=
m
/
/
divisor
-
1
prod
=
divisor
*
j
if
type
(
prod
)
is
not
long
:
raise
TestFailed
,
(
"expected type(
%
r) to be long, not
%
r"
%
...
...
@@ -91,7 +91,7 @@ for divisor in 1, 2, 4, 8, 16, 32:
# Check for expected * overflow to long.
m
=
sys
.
maxint
for
divisor
in
1
,
2
,
4
,
8
,
16
,
32
:
j
=
m
/
divisor
+
1
j
=
m
/
/
divisor
+
1
prod
=
divisor
*
j
if
type
(
prod
)
is
not
long
:
raise
TestFailed
,
(
"expected type(
%
r) to be long, not
%
r"
%
...
...
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