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
630cc482
Kaydet (Commit)
630cc482
authored
Tem 22, 2009
tarafından
R. David Murray
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Issue 6542: Make sure that TestInvalidFD.test_closerange does not
close any valid file descriptors.
üst
953152f0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
1 deletion
+12
-1
test_os.py
Lib/test/test_os.py
+12
-1
No files found.
Lib/test/test_os.py
Dosyayı görüntüle @
630cc482
...
@@ -617,7 +617,18 @@ class TestInvalidFD(unittest.TestCase):
...
@@ -617,7 +617,18 @@ class TestInvalidFD(unittest.TestCase):
def
test_closerange
(
self
):
def
test_closerange
(
self
):
if
hasattr
(
os
,
"closerange"
):
if
hasattr
(
os
,
"closerange"
):
fd
=
support
.
make_bad_fd
()
fd
=
support
.
make_bad_fd
()
self
.
assertEqual
(
os
.
closerange
(
fd
,
fd
+
10
),
None
)
# Make sure none of the descriptors we are about to close are
# currently valid (issue 6542).
for
i
in
range
(
10
):
try
:
os
.
fstat
(
fd
+
i
)
except
OSError
:
pass
else
:
break
if
i
<
2
:
raise
unittest
.
SkipTest
(
"Unable to acquire a range of invalid file descriptors"
)
self
.
assertEqual
(
os
.
closerange
(
fd
,
fd
+
i
-
1
),
None
)
def
test_dup2
(
self
):
def
test_dup2
(
self
):
if
hasattr
(
os
,
"dup2"
):
if
hasattr
(
os
,
"dup2"
):
...
...
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