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
f084e048
Kaydet (Commit)
f084e048
authored
Mar 18, 2008
tarafından
Brett Cannon
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fix test_errno to only check for error numbers that are defined by Standard C.
üst
10ed0f50
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
50 deletions
+4
-50
test_errno.py
Lib/test/test_errno.py
+4
-50
No files found.
Lib/test/test_errno.py
Dosyayı görüntüle @
f084e048
...
@@ -7,61 +7,15 @@ import errno
...
@@ -7,61 +7,15 @@ import errno
from
test
import
test_support
from
test
import
test_support
import
unittest
import
unittest
errors
=
[
'E2BIG'
,
'EACCES'
,
'EADDRINUSE'
,
'EADDRNOTAVAIL'
,
'EADV'
,
std_c_errors
=
frozenset
([
'EDOM'
,
'ERANGE'
])
'EAFNOSUPPORT'
,
'EAGAIN'
,
'EALREADY'
,
'EBADE'
,
'EBADF'
,
'EBADFD'
,
'EBADMSG'
,
'EBADR'
,
'EBADRQC'
,
'EBADSLT'
,
'EBFONT'
,
'EBUSY'
,
'ECHIL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UTDOWN'
,
'ESOCKTNOSUPPORT'
,
'ESPIPE'
,
'ESRCH'
,
'ESRMNT'
,
'ESTALE'
,
'ESTRPIPE'
,
'ETIME'
,
'ETIMEDOUT'
,
'ETOOMANYREFS'
,
'ETXTBSY'
,
'EUCLEAN'
,
'EUNATCH'
,
'EUSERS'
,
'EWOULDBLOCK'
,
'EXDEV'
,
'EXFULL'
,
'WSABASEERR'
,
'WSADESCRIPTIO'
,
'WSAEACCES'
,
'WSAEADDRINUSE'
,
'WSAEADDRNOTAVAIL'
,
'WSAEAFNOSUPPORT'
,
'WSAEALREADY'
,
'WSAEBADF'
,
'WSAECONNABORTED'
,
'WSAECONNREFUSED'
,
'WSAECONNRESET'
,
'WSAEDESTADDRREQ'
,
'WSAEDISCON'
,
'WSAEDQUOT'
,
'WSAEFAULT'
,
'WSAEHOSTDOWN'
,
'WSAEHOSTUNREACH'
,
'WSAEINPROGRESS'
,
'WSAEINTR'
,
'WSAEINVAL'
,
'WSAEISCONN'
,
'WSAELOOP'
,
'WSAEMFILE'
,
'WSAEMSGSIZE'
,
'WSAENAMETOOLONG'
,
'WSAENETDOWN'
,
'WSAENETRESET'
,
'WSAENETUNREACH'
,
'WSAENOBUFS'
,
'WSAENOPROTOOPT'
,
'WSAENOTCONN'
,
'WSAENOTEMPTY'
,
'WSAENOTSOCK'
,
'WSAEOPNOTSUPP'
,
'WSAEPFNOSUPPORT'
,
'WSAEPROCLIM'
,
'WSAEPROTONOSUPPORT'
,
'WSAEPROTOTYPE'
,
'WSAEREMOTE'
,
'WSAESHUTDOWN'
,
'WSAESOCKTNOSUPPORT'
,
'WSAESTALE'
,
'WSAETIMEDOUT'
,
'WSAETOOMANYREFS'
,
'WSAEUSERS'
,
'WSAEWOULDBLOCK'
,
'WSAGETASYNCBUFLE'
,
'WSAGETASYNCERRO'
,
'WSAGETSELECTERRO'
,
'WSAGETSELECTEVEN'
,
'WSAHOS'
,
'WSAMAKEASYNCREPL'
,
'WSAMAKESELECTREPL'
,
'WSAN'
,
'WSANOTINITIALISED'
,
'WSASY'
,
'WSASYSNOTREADY'
,
'WSATR'
,
'WSAVERNOTSUPPORTED'
]
class
ErrnoAttributeTests
(
unittest
.
TestCase
):
class
ErrnoAttributeTests
(
unittest
.
TestCase
):
def
test_for_improper_attributes
(
self
):
def
test_for_improper_attributes
(
self
):
# No unexpected attributes should be on the module.
# No unexpected attributes should be on the module.
errors_set
=
set
(
errors
)
for
error_code
in
std_c_errors
:
for
attribute
in
errno
.
__dict__
.
iterkeys
():
self
.
assert_
(
hasattr
(
errno
,
error_code
),
if
attribute
.
isupper
():
"errno is missing
%
s"
%
error_code
)
self
.
assert_
(
attribute
in
errors_set
,
"
%
s is an unexpected error value"
%
attribute
)
def
test_using_errorcode
(
self
):
def
test_using_errorcode
(
self
):
# Every key value in errno.errorcode should be on the module.
# Every key value in errno.errorcode should be on the module.
...
...
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