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
a606542e
Kaydet (Commit)
a606542e
authored
Eki 21, 2013
tarafından
Georg Brandl
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
#19274: use captured_stdout() in the test suite; add NEWS entry.
üst
b0c84cda
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
12 deletions
+15
-12
zipfile.rst
Doc/library/zipfile.rst
+3
-3
test_zipfile.py
Lib/test/test_zipfile.py
+5
-8
NEWS
Misc/NEWS
+7
-1
No files found.
Doc/library/zipfile.rst
Dosyayı görüntüle @
a606542e
...
@@ -384,9 +384,6 @@ The :class:`PyZipFile` constructor takes the same parameters as the
...
@@ -384,9 +384,6 @@ The :class:`PyZipFile` constructor takes the same parameters as the
.. method:: PyZipFile.writepy(pathname, basename='', filterfunc=None)
.. method:: PyZipFile.writepy(pathname, basename='', filterfunc=None)
.. versionadded:: 3.4
The *filterfunc* parameter.
Search for files :file:`\*.py` and add the corresponding file to the
Search for files :file:`\*.py` and add the corresponding file to the
archive.
archive.
...
@@ -419,6 +416,9 @@ The :class:`PyZipFile` constructor takes the same parameters as the
...
@@ -419,6 +416,9 @@ The :class:`PyZipFile` constructor takes the same parameters as the
test/bogus/__init__.pyc # Subpackage directory
test/bogus/__init__.pyc # Subpackage directory
test/bogus/myfile.pyc # Submodule test.bogus.myfile
test/bogus/myfile.pyc # Submodule test.bogus.myfile
.. versionadded:: 3.4
The *filterfunc* parameter.
.. _zipinfo-objects:
.. _zipinfo-objects:
...
...
Lib/test/test_zipfile.py
Dosyayı görüntüle @
a606542e
...
@@ -597,22 +597,19 @@ class PyZipFileTests(unittest.TestCase):
...
@@ -597,22 +597,19 @@ class PyZipFileTests(unittest.TestCase):
with
TemporaryFile
()
as
t
,
zipfile
.
PyZipFile
(
t
,
"w"
)
as
zipfp
:
with
TemporaryFile
()
as
t
,
zipfile
.
PyZipFile
(
t
,
"w"
)
as
zipfp
:
stdout
=
sys
.
stdout
# first make sure that the test folder gives error messages
# first make sure that the test folder gives error messages
sys
.
stdout
=
reportSIO
=
io
.
StringIO
()
# (on the badsyntax_... files)
zipfp
.
writepy
(
packagedir
)
with
captured_stdout
()
as
reportSIO
:
zipfp
.
writepy
(
packagedir
)
reportStr
=
reportSIO
.
getvalue
()
reportStr
=
reportSIO
.
getvalue
()
self
.
assertTrue
(
'SyntaxError'
in
reportStr
)
self
.
assertTrue
(
'SyntaxError'
in
reportStr
)
# then check that the filter works
# then check that the filter works
sys
.
stdout
=
reportSIO
=
io
.
StringIO
()
with
captured_stdout
()
as
reportSIO
:
zipfp
.
writepy
(
packagedir
,
filterfunc
=
lambda
whatever
:
False
)
zipfp
.
writepy
(
packagedir
,
filterfunc
=
lambda
whatever
:
False
)
reportStr
=
reportSIO
.
getvalue
()
reportStr
=
reportSIO
.
getvalue
()
self
.
assertTrue
(
'SyntaxError'
not
in
reportStr
)
self
.
assertTrue
(
'SyntaxError'
not
in
reportStr
)
sys
.
stdout
=
stdout
def
test_write_with_optimization
(
self
):
def
test_write_with_optimization
(
self
):
import
email
import
email
packagedir
=
os
.
path
.
dirname
(
email
.
__file__
)
packagedir
=
os
.
path
.
dirname
(
email
.
__file__
)
...
...
Misc/NEWS
Dosyayı görüntüle @
a606542e
...
@@ -10,9 +10,15 @@ Projected release date: 2013-11-24
...
@@ -10,9 +10,15 @@ Projected release date: 2013-11-24
Core and Builtins
Core and Builtins
-----------------
-----------------
- Issue 19306: Add extra hints to the faulthandler module'
s
stack
- Issue
#
19306: Add extra hints to the faulthandler module'
s
stack
dumps
that
these
are
"upside down"
.
dumps
that
these
are
"upside down"
.
Library
-------
-
Issue
#
19274
:
Add
a
filterfunc
parameter
to
PyZipFile
.
writepy
.
What
's New in Python 3.4.0 Alpha 4?
What
's New in Python 3.4.0 Alpha 4?
===================================
===================================
...
...
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