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
1e2775f3
Kaydet (Commit)
1e2775f3
authored
Agu 24, 2001
tarafından
Barry Warsaw
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Rip the import repr truncation test out of here and put it in test_repr.py
üst
0bcf6d8d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
35 deletions
+0
-35
test_import.py
Lib/test/test_import.py
+0
-35
No files found.
Lib/test/test_import.py
Dosyayı görüntüle @
1e2775f3
...
...
@@ -69,38 +69,3 @@ try:
test_with_extension
(
ext
)
finally
:
del
sys
.
path
[
0
]
def
touch
(
path
):
fp
=
open
(
path
,
'w'
)
fp
.
close
()
# test imports of packages with really long names, but specifically that their
# reprs include the full name
try
:
longname
=
'areallylongpackageandmodulenametotestreprtruncation'
os
.
mkdir
(
longname
)
touch
(
os
.
path
.
join
(
longname
,
'__init__.py'
))
os
.
mkdir
(
os
.
path
.
join
(
longname
,
longname
))
touch
(
os
.
path
.
join
(
longname
,
longname
,
'__init__.py'
))
touch
(
os
.
path
.
join
(
longname
,
longname
,
longname
+
'.py'
))
sys
.
path
.
insert
(
0
,
os
.
getcwd
())
from
areallylongpackageandmodulenametotestreprtruncation.areallylongpackageandmodulenametotestreprtruncation
import
areallylongpackageandmodulenametotestreprtruncation
if
`areallylongpackageandmodulenametotestreprtruncation`
<>
\
"<module 'areallylongpackageandmodulenametotestreprtruncation.areallylongpackageandmodulenametotestreprtruncation.areallylongpackageandmodulenametotestreprtruncation' from '
%
s'>"
%
areallylongpackageandmodulenametotestreprtruncation
.
__file__
:
raise
TestFailed
,
'module name truncation'
finally
:
# Delete recursively
del
sys
.
path
[
0
]
def
zap
(
actions
,
dirname
,
names
):
for
name
in
names
:
actions
.
append
(
os
.
path
.
join
(
dirname
,
name
))
actions
=
[]
os
.
path
.
walk
(
longname
,
zap
,
actions
)
actions
.
append
(
longname
)
actions
.
sort
()
actions
.
reverse
()
for
p
in
actions
:
if
os
.
path
.
isdir
(
p
):
os
.
rmdir
(
p
)
else
:
os
.
remove
(
p
)
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