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
bb93d177
Kaydet (Commit)
bb93d177
authored
Mar 31, 2009
tarafından
Georg Brandl
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Add example for new copydir_run_2to3().
üst
fa1fcd10
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
2 deletions
+29
-2
setup.py
Demo/distutils/test2to3/setup.py
+2
-2
runtests.py
Demo/distutils/test2to3/test/runtests.py
+19
-0
test_foo.py
Demo/distutils/test2to3/test/test_foo.py
+8
-0
No files found.
Demo/distutils/test2to3/setup.py
Dosyayı görüntüle @
bb93d177
...
@@ -20,7 +20,7 @@ setup(
...
@@ -20,7 +20,7 @@ setup(
license
=
"PSF license"
,
license
=
"PSF license"
,
packages
=
[
"test2to3"
],
packages
=
[
"test2to3"
],
scripts
=
[
"maintest.py"
],
scripts
=
[
"maintest.py"
],
cmdclass
=
{
'build_py'
:
build_py
,
cmdclass
=
{
'build_py'
:
build_py
,
'build_scripts'
:
build_scripts
,
'build_scripts'
:
build_scripts
,
}
}
)
)
Demo/distutils/test2to3/test/runtests.py
0 → 100644
Dosyayı görüntüle @
bb93d177
# Fictitious test runner for the project
import
sys
,
os
if
sys
.
version_info
>
(
3
,):
# copy test suite over to "build/lib" and convert it
from
distutils.util
import
copydir_run_2to3
testroot
=
os
.
path
.
dirname
(
__file__
)
newroot
=
os
.
path
.
join
(
testroot
,
'..'
,
'build/lib/test'
)
copydir_run_2to3
(
testroot
,
newroot
)
# in the following imports, pick up the converted modules
sys
.
path
[
0
]
=
newroot
# run the tests here...
from
test_foo
import
FooTest
import
unittest
unittest
.
main
()
Demo/distutils/test2to3/test/test_foo.py
0 → 100644
Dosyayı görüntüle @
bb93d177
import
sys
import
unittest
class
FooTest
(
unittest
.
TestCase
):
def
test_foo
(
self
):
# use 2.6 syntax to demonstrate conversion
print
'In test_foo, using Python
%
s...'
%
(
sys
.
version_info
,)
self
.
assertTrue
(
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