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
b1295da5
Kaydet (Commit)
b1295da5
authored
Nis 01, 2002
tarafından
Neal Norwitz
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
There is no TestError, use TestFailed appropriately
üst
8392f365
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
10 deletions
+10
-10
test_descr.py
Lib/test/test_descr.py
+1
-1
test_file.py
Lib/test/test_file.py
+8
-8
test_mpz.py
Lib/test/test_mpz.py
+1
-1
No files found.
Lib/test/test_descr.py
Dosyayı görüntüle @
b1295da5
...
@@ -785,7 +785,7 @@ def metaclass():
...
@@ -785,7 +785,7 @@ def metaclass():
c
=
C
()
c
=
C
()
try
:
c
()
try
:
c
()
except
TypeError
:
pass
except
TypeError
:
pass
else
:
raise
Test
Error
,
"calling object w/o call method should raise TypeError"
else
:
raise
Test
Failed
,
"calling object w/o call method should raise TypeError"
def
pymods
():
def
pymods
():
if
verbose
:
print
"Testing Python subclass of module..."
if
verbose
:
print
"Testing Python subclass of module..."
...
...
Lib/test/test_file.py
Dosyayı görüntüle @
b1295da5
import
os
import
os
from
array
import
array
from
array
import
array
from
test_support
import
verify
,
TESTFN
from
test_support
import
verify
,
TESTFN
,
TestFailed
from
UserList
import
UserList
from
UserList
import
UserList
# verify writelines with instance sequence
# verify writelines with instance sequence
...
@@ -70,23 +70,23 @@ else:
...
@@ -70,23 +70,23 @@ else:
f
=
open
(
TESTFN
)
f
=
open
(
TESTFN
)
if
f
.
name
!=
TESTFN
:
if
f
.
name
!=
TESTFN
:
raise
Test
Error
,
'file.name should be "
%
s"'
%
TESTFN
raise
Test
Failed
,
'file.name should be "
%
s"'
%
TESTFN
if
f
.
isatty
():
if
f
.
isatty
():
raise
Test
Error
,
'file.isatty() should be false'
raise
Test
Failed
,
'file.isatty() should be false'
if
f
.
closed
:
if
f
.
closed
:
raise
Test
Error
,
'file.closed should be false'
raise
Test
Failed
,
'file.closed should be false'
try
:
try
:
f
.
readinto
(
""
)
f
.
readinto
(
""
)
except
TypeError
:
except
TypeError
:
pass
pass
else
:
else
:
raise
Test
Error
,
'file.readinto("") should raise a TypeError'
raise
Test
Failed
,
'file.readinto("") should raise a TypeError'
f
.
close
()
f
.
close
()
if
not
f
.
closed
:
if
not
f
.
closed
:
raise
Test
Error
,
'file.closed should be true'
raise
Test
Failed
,
'file.closed should be true'
for
methodname
in
[
'fileno'
,
'flush'
,
'isatty'
,
'read'
,
'readinto'
,
'readline'
,
'readlines'
,
'seek'
,
'tell'
,
'truncate'
,
'write'
,
'xreadlines'
]:
for
methodname
in
[
'fileno'
,
'flush'
,
'isatty'
,
'read'
,
'readinto'
,
'readline'
,
'readlines'
,
'seek'
,
'tell'
,
'truncate'
,
'write'
,
'xreadlines'
]:
method
=
getattr
(
f
,
methodname
)
method
=
getattr
(
f
,
methodname
)
...
@@ -95,13 +95,13 @@ for methodname in ['fileno', 'flush', 'isatty', 'read', 'readinto', 'readline',
...
@@ -95,13 +95,13 @@ for methodname in ['fileno', 'flush', 'isatty', 'read', 'readinto', 'readline',
except
ValueError
:
except
ValueError
:
pass
pass
else
:
else
:
raise
Test
Error
,
'file.
%
s() on a closed file should raise a ValueError'
%
methodname
raise
Test
Failed
,
'file.
%
s() on a closed file should raise a ValueError'
%
methodname
try
:
try
:
f
.
writelines
([])
f
.
writelines
([])
except
ValueError
:
except
ValueError
:
pass
pass
else
:
else
:
raise
Test
Error
,
'file.writelines([]) on a closed file should raise a ValueError'
raise
Test
Failed
,
'file.writelines([]) on a closed file should raise a ValueError'
os
.
unlink
(
TESTFN
)
os
.
unlink
(
TESTFN
)
Lib/test/test_mpz.py
Dosyayı görüntüle @
b1295da5
import
mpz
import
mpz
from
test_support
import
vereq
from
test_support
import
vereq
,
TestFailed
def
check_conversion
(
num
):
def
check_conversion
(
num
):
mpz_num
=
mpz
.
mpz
(
num
)
mpz_num
=
mpz
.
mpz
(
num
)
...
...
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