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
e7437a7c
Kaydet (Commit)
e7437a7c
authored
Ara 26, 2011
tarafından
Jason R. Coombs
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Ported some test cases from 2.7 for #11638
üst
1e66f56d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
2 deletions
+21
-2
test_archive_util.py
Lib/distutils/tests/test_archive_util.py
+21
-2
No files found.
Lib/distutils/tests/test_archive_util.py
Dosyayı görüntüle @
e7437a7c
# -*- coding: utf-8 -*-
"""Tests for distutils.archive_util."""
"""Tests for distutils.archive_util."""
import
unittest
import
unittest
import
os
import
os
...
@@ -32,6 +33,24 @@ class ArchiveUtilTestCase(support.TempdirManager,
...
@@ -32,6 +33,24 @@ class ArchiveUtilTestCase(support.TempdirManager,
@unittest.skipUnless
(
ZLIB_SUPPORT
,
'Need zlib support to run'
)
@unittest.skipUnless
(
ZLIB_SUPPORT
,
'Need zlib support to run'
)
def
test_make_tarball
(
self
):
def
test_make_tarball
(
self
):
self
.
_make_tarball
(
'archive'
)
@unittest.skipUnless
(
ZLIB_SUPPORT
,
'Need zlib support to run'
)
def
test_make_tarball_latin1
(
self
):
"""
Mirror test_make_tarball, except filename contains latin characters.
"""
self
.
_make_tarball
(
'årchiv'
)
# note this isn't a real word
@unittest.skipUnless
(
ZLIB_SUPPORT
,
'Need zlib support to run'
)
def
test_make_tarball_extended
(
self
):
"""
Mirror test_make_tarball, except filename contains extended
characters outside the latin charset.
"""
self
.
_make_tarball
(
'のアーカイブ'
)
# japanese for archive
def
_make_tarball
(
self
,
target_name
):
# creating something to tar
# creating something to tar
tmpdir
=
self
.
mkdtemp
()
tmpdir
=
self
.
mkdtemp
()
self
.
write_file
([
tmpdir
,
'file1'
],
'xxx'
)
self
.
write_file
([
tmpdir
,
'file1'
],
'xxx'
)
...
@@ -43,7 +62,7 @@ class ArchiveUtilTestCase(support.TempdirManager,
...
@@ -43,7 +62,7 @@ class ArchiveUtilTestCase(support.TempdirManager,
unittest
.
skipUnless
(
splitdrive
(
tmpdir
)[
0
]
==
splitdrive
(
tmpdir2
)[
0
],
unittest
.
skipUnless
(
splitdrive
(
tmpdir
)[
0
]
==
splitdrive
(
tmpdir2
)[
0
],
"Source and target should be on same drive"
)
"Source and target should be on same drive"
)
base_name
=
os
.
path
.
join
(
tmpdir2
,
'archive'
)
base_name
=
os
.
path
.
join
(
tmpdir2
,
target_name
)
# working with relative paths to avoid tar warnings
# working with relative paths to avoid tar warnings
old_dir
=
os
.
getcwd
()
old_dir
=
os
.
getcwd
()
...
@@ -58,7 +77,7 @@ class ArchiveUtilTestCase(support.TempdirManager,
...
@@ -58,7 +77,7 @@ class ArchiveUtilTestCase(support.TempdirManager,
self
.
assertTrue
(
os
.
path
.
exists
(
tarball
))
self
.
assertTrue
(
os
.
path
.
exists
(
tarball
))
# trying an uncompressed one
# trying an uncompressed one
base_name
=
os
.
path
.
join
(
tmpdir2
,
'archive'
)
base_name
=
os
.
path
.
join
(
tmpdir2
,
target_name
)
old_dir
=
os
.
getcwd
()
old_dir
=
os
.
getcwd
()
os
.
chdir
(
tmpdir
)
os
.
chdir
(
tmpdir
)
try
:
try
:
...
...
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