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
b589cef9
Unverified
Kaydet (Commit)
b589cef9
authored
Haz 11, 2019
tarafından
Victor Stinner
Kaydeden (comit)
GitHub
Haz 11, 2019
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
bpo-37223: test_io: silence destructor errors (GH-13954)
Implement also MockNonBlockWriterIO.seek() method.
üst
4f6f7c5a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
0 deletions
+10
-0
test_io.py
Lib/test/test_io.py
+10
-0
No files found.
Lib/test/test_io.py
Dosyayı görüntüle @
b589cef9
...
@@ -277,6 +277,10 @@ class MockNonBlockWriterIO:
...
@@ -277,6 +277,10 @@ class MockNonBlockWriterIO:
def
seekable
(
self
):
def
seekable
(
self
):
return
True
return
True
def
seek
(
self
,
pos
,
whence
=
0
):
# naive implementation, enough for tests
return
0
def
writable
(
self
):
def
writable
(
self
):
return
True
return
True
...
@@ -1486,6 +1490,9 @@ class BufferedReaderTest(unittest.TestCase, CommonBufferedTests):
...
@@ -1486,6 +1490,9 @@ class BufferedReaderTest(unittest.TestCase, CommonBufferedTests):
self
.
assertRaises
(
OSError
,
bufio
.
seek
,
0
)
self
.
assertRaises
(
OSError
,
bufio
.
seek
,
0
)
self
.
assertRaises
(
OSError
,
bufio
.
tell
)
self
.
assertRaises
(
OSError
,
bufio
.
tell
)
# Silence destructor error
bufio
.
close
=
lambda
:
None
def
test_no_extraneous_read
(
self
):
def
test_no_extraneous_read
(
self
):
# Issue #9550; when the raw IO object has satisfied the read request,
# Issue #9550; when the raw IO object has satisfied the read request,
# we should not issue any additional reads, otherwise it may block
# we should not issue any additional reads, otherwise it may block
...
@@ -1834,6 +1841,9 @@ class BufferedWriterTest(unittest.TestCase, CommonBufferedTests):
...
@@ -1834,6 +1841,9 @@ class BufferedWriterTest(unittest.TestCase, CommonBufferedTests):
self
.
assertRaises
(
OSError
,
bufio
.
tell
)
self
.
assertRaises
(
OSError
,
bufio
.
tell
)
self
.
assertRaises
(
OSError
,
bufio
.
write
,
b
"abcdef"
)
self
.
assertRaises
(
OSError
,
bufio
.
write
,
b
"abcdef"
)
# Silence destructor error
bufio
.
close
=
lambda
:
None
def
test_max_buffer_size_removal
(
self
):
def
test_max_buffer_size_removal
(
self
):
with
self
.
assertRaises
(
TypeError
):
with
self
.
assertRaises
(
TypeError
):
self
.
tp
(
self
.
MockRawIO
(),
8
,
12
)
self
.
tp
(
self
.
MockRawIO
(),
8
,
12
)
...
...
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