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
e1e3b129
Kaydet (Commit)
e1e3b129
authored
May 19, 2011
tarafından
Victor Stinner
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
fix packaging tests on Windows: use os.path.join() in glob patterns
üst
21809a69
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
14 deletions
+16
-14
test_resources.py
Lib/packaging/tests/test_resources.py
+6
-6
test_util.py
Lib/packaging/tests/test_util.py
+10
-8
No files found.
Lib/packaging/tests/test_resources.py
Dosyayı görüntüle @
e1e3b129
...
...
@@ -58,7 +58,7 @@ class DataFilesTestCase(GlobTestCaseBase):
def
test_set_match_exclude
(
self
):
rules
=
[(
'scripts'
,
'*'
,
'{appscript}'
),
(
''
,
'**/*.sh'
,
None
)]
(
''
,
os
.
path
.
join
(
'**'
,
'*.sh'
)
,
None
)]
spec
=
{
'scripts/scripts.bin'
:
'{appscript}/scripts.bin'
,
'scripts/script.sh'
:
None
,
'Babarlikestrawberry'
:
None
}
...
...
@@ -73,7 +73,7 @@ class DataFilesTestCase(GlobTestCaseBase):
self
.
assertRulesMatch
(
rules
,
spec
)
def
test_recursive_glob
(
self
):
rules
=
[(
''
,
'**/*.bin'
,
'{binary}'
)]
rules
=
[(
''
,
os
.
path
.
join
(
'**'
,
'*.bin'
)
,
'{binary}'
)]
spec
=
{
'binary0.bin'
:
'{binary}/binary0.bin'
,
'scripts/binary1.bin'
:
'{binary}/scripts/binary1.bin'
,
'scripts/bin/binary2.bin'
:
'{binary}/scripts/bin/binary2.bin'
,
...
...
@@ -83,12 +83,12 @@ class DataFilesTestCase(GlobTestCaseBase):
def
test_final_exemple_glob
(
self
):
rules
=
[
(
'mailman/database/schemas/'
,
'*'
,
'{appdata}/schemas'
),
(
''
,
'**/*.tpl'
,
'{appdata}/templates'
),
(
''
,
'developer-docs/**/*.txt'
,
'{doc}'
),
(
''
,
os
.
path
.
join
(
'**'
,
'*.tpl'
)
,
'{appdata}/templates'
),
(
''
,
os
.
path
.
join
(
'developer-docs'
,
'**'
,
'*.txt'
)
,
'{doc}'
),
(
''
,
'README'
,
'{doc}'
),
(
'mailman/etc/'
,
'*'
,
'{config}'
),
(
'mailman/foo/'
,
'**/bar/*.cfg'
,
'{config}/baz'
),
(
'mailman/foo/'
,
'**/*.cfg'
,
'{config}/hmm'
),
(
'mailman/foo/'
,
os
.
path
.
join
(
'**'
,
'bar'
,
'*.cfg'
)
,
'{config}/baz'
),
(
'mailman/foo/'
,
os
.
path
.
join
(
'**'
,
'*.cfg'
)
,
'{config}/hmm'
),
(
''
,
'some-new-semantic.sns'
,
'{funky-crazy-category}'
),
]
spec
=
{
...
...
Lib/packaging/tests/test_util.py
Dosyayı görüntüle @
e1e3b129
...
...
@@ -542,7 +542,7 @@ class GlobTestCase(GlobTestCaseBase):
self
.
assertGlobMatch
(
glob
,
spec
)
def
test_simple_glob_in_dir
(
self
):
glob
=
'babar/*.tp?'
glob
=
os
.
path
.
join
(
'babar'
,
'*.tp?'
)
spec
=
{
'babar/coucou.tpl'
:
True
,
'babar/coucou.tpj'
:
True
,
'babar/toto.bin'
:
False
,
...
...
@@ -550,7 +550,7 @@ class GlobTestCase(GlobTestCaseBase):
self
.
assertGlobMatch
(
glob
,
spec
)
def
test_recursive_glob_head
(
self
):
glob
=
'**/tip/*.t?l'
glob
=
os
.
path
.
join
(
'**'
,
'tip'
,
'*.t?l'
)
spec
=
{
'babar/zaza/zuzu/tip/coucou.tpl'
:
True
,
'babar/z/tip/coucou.tpl'
:
True
,
'babar/tip/coucou.tpl'
:
True
,
...
...
@@ -563,7 +563,7 @@ class GlobTestCase(GlobTestCaseBase):
self
.
assertGlobMatch
(
glob
,
spec
)
def
test_recursive_glob_tail
(
self
):
glob
=
'babar/**'
glob
=
os
.
path
.
join
(
'babar'
,
'**'
)
spec
=
{
'babar/zaza/'
:
True
,
'babar/zaza/zuzu/'
:
True
,
'babar/zaza/zuzu/babar.xml'
:
True
,
...
...
@@ -577,7 +577,7 @@ class GlobTestCase(GlobTestCaseBase):
self
.
assertGlobMatch
(
glob
,
spec
)
def
test_recursive_glob_middle
(
self
):
glob
=
'babar/**/tip/*.t?l'
glob
=
os
.
path
.
join
(
'babar'
,
'**'
,
'tip'
,
'*.t?l'
)
spec
=
{
'babar/zaza/zuzu/tip/coucou.tpl'
:
True
,
'babar/z/tip/coucou.tpl'
:
True
,
'babar/tip/coucou.tpl'
:
True
,
...
...
@@ -590,7 +590,7 @@ class GlobTestCase(GlobTestCaseBase):
self
.
assertGlobMatch
(
glob
,
spec
)
def
test_glob_set_tail
(
self
):
glob
=
'bin/*.{bin,sh,exe}'
glob
=
os
.
path
.
join
(
'bin'
,
'*.{bin,sh,exe}'
)
spec
=
{
'bin/babar.bin'
:
True
,
'bin/zephir.sh'
:
True
,
'bin/celestine.exe'
:
True
,
...
...
@@ -601,7 +601,7 @@ class GlobTestCase(GlobTestCaseBase):
self
.
assertGlobMatch
(
glob
,
spec
)
def
test_glob_set_middle
(
self
):
glob
=
'xml/{babar,toto}.xml'
glob
=
os
.
path
.
join
(
'xml'
,
'{babar,toto}.xml'
)
spec
=
{
'xml/babar.xml'
:
True
,
'xml/toto.xml'
:
True
,
'xml/babar.xslt'
:
False
,
...
...
@@ -612,7 +612,7 @@ class GlobTestCase(GlobTestCaseBase):
self
.
assertGlobMatch
(
glob
,
spec
)
def
test_glob_set_head
(
self
):
glob
=
'{xml,xslt}/babar.*'
glob
=
os
.
path
.
join
(
'{xml,xslt}'
,
'babar.*'
)
spec
=
{
'xml/babar.xml'
:
True
,
'xml/toto.xml'
:
False
,
'xslt/babar.xslt'
:
True
,
...
...
@@ -622,7 +622,9 @@ class GlobTestCase(GlobTestCaseBase):
self
.
assertGlobMatch
(
glob
,
spec
)
def
test_glob_all
(
self
):
glob
=
'{xml/*,xslt/**}/babar.xml'
dirs
=
'{
%
s,
%
s}'
%
(
os
.
path
.
join
(
'xml'
,
'*'
),
os
.
path
.
join
(
'xslt'
,
'**'
))
glob
=
os
.
path
.
join
(
dirs
,
'babar.xml'
)
spec
=
{
'xml/a/babar.xml'
:
True
,
'xml/b/babar.xml'
:
True
,
'xml/a/c/babar.xml'
:
False
,
...
...
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