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
697ce556
Kaydet (Commit)
697ce556
authored
Ara 16, 2012
tarafından
Antoine Pitrou
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fix ResourceWarnings in test_pty
üst
5461558d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
test_pty.py
Lib/test/test_pty.py
+5
-3
No files found.
Lib/test/test_pty.py
Dosyayı görüntüle @
697ce556
...
...
@@ -215,7 +215,7 @@ class SmallPtyTests(unittest.TestCase):
for
fd
in
self
.
fds
:
try
:
os
.
close
(
fd
)
except
:
except
OSError
:
pass
def
_pipe
(
self
):
...
...
@@ -235,8 +235,9 @@ class SmallPtyTests(unittest.TestCase):
mock_stdin_fd
,
write_to_stdin_fd
=
self
.
_pipe
()
pty
.
STDIN_FILENO
=
mock_stdin_fd
socketpair
=
socket
.
socketpair
()
for
s
in
socketpair
:
self
.
addCleanup
(
s
.
close
)
masters
=
[
s
.
fileno
()
for
s
in
socketpair
]
self
.
fds
.
extend
(
masters
)
# Feed data. Smaller than PIPEBUF. These writes will not block.
os
.
write
(
masters
[
1
],
b
'from master'
)
...
...
@@ -264,8 +265,9 @@ class SmallPtyTests(unittest.TestCase):
mock_stdin_fd
,
write_to_stdin_fd
=
self
.
_pipe
()
pty
.
STDIN_FILENO
=
mock_stdin_fd
socketpair
=
socket
.
socketpair
()
for
s
in
socketpair
:
self
.
addCleanup
(
s
.
close
)
masters
=
[
s
.
fileno
()
for
s
in
socketpair
]
self
.
fds
.
extend
(
masters
)
os
.
close
(
masters
[
1
])
socketpair
[
1
]
.
close
()
...
...
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