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
4c2bada2
Kaydet (Commit)
4c2bada2
authored
Şub 14, 2015
tarafından
Serhiy Storchaka
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Issue #17753: Skip test_zipfile tests which require write access to test
and email.test.
üst
b6b48e63
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
+6
-0
test_zipfile.py
Lib/test/test_zipfile.py
+6
-0
No files found.
Lib/test/test_zipfile.py
Dosyayı görüntüle @
4c2bada2
...
@@ -775,7 +775,12 @@ class TestZip64InSmallFiles(unittest.TestCase):
...
@@ -775,7 +775,12 @@ class TestZip64InSmallFiles(unittest.TestCase):
class
PyZipFileTests
(
unittest
.
TestCase
):
class
PyZipFileTests
(
unittest
.
TestCase
):
def
requiresWriteAccess
(
self
,
path
):
if
not
os
.
access
(
path
,
os
.
W_OK
):
self
.
skipTest
(
'requires write access to the installed location'
)
def
test_write_pyfile
(
self
):
def
test_write_pyfile
(
self
):
self
.
requiresWriteAccess
(
os
.
path
.
dirname
(
__file__
))
with
zipfile
.
PyZipFile
(
TemporaryFile
(),
"w"
)
as
zipfp
:
with
zipfile
.
PyZipFile
(
TemporaryFile
(),
"w"
)
as
zipfp
:
fn
=
__file__
fn
=
__file__
if
fn
.
endswith
(
'.pyc'
)
or
fn
.
endswith
(
'.pyo'
):
if
fn
.
endswith
(
'.pyc'
)
or
fn
.
endswith
(
'.pyo'
):
...
@@ -803,6 +808,7 @@ class PyZipFileTests(unittest.TestCase):
...
@@ -803,6 +808,7 @@ class PyZipFileTests(unittest.TestCase):
def
test_write_python_package
(
self
):
def
test_write_python_package
(
self
):
import
email
import
email
packagedir
=
os
.
path
.
dirname
(
email
.
__file__
)
packagedir
=
os
.
path
.
dirname
(
email
.
__file__
)
self
.
requiresWriteAccess
(
packagedir
)
with
zipfile
.
PyZipFile
(
TemporaryFile
(),
"w"
)
as
zipfp
:
with
zipfile
.
PyZipFile
(
TemporaryFile
(),
"w"
)
as
zipfp
:
zipfp
.
writepy
(
packagedir
)
zipfp
.
writepy
(
packagedir
)
...
...
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