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
53bfc1a4
Kaydet (Commit)
53bfc1a4
authored
Ock 08, 2010
tarafından
Tarek Ziadé
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
added more test coverage from trunk for #7617
üst
330a80c4
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
59 additions
and
0 deletions
+59
-0
test_install_lib.py
Lib/distutils/tests/test_install_lib.py
+35
-0
test_util.py
Lib/distutils/tests/test_util.py
+24
-0
No files found.
Lib/distutils/tests/test_install_lib.py
0 → 100644
Dosyayı görüntüle @
53bfc1a4
"""Tests for distutils.command.install_data."""
import
sys
import
os
import
unittest
from
distutils.command.install_lib
import
install_lib
from
distutils.extension
import
Extension
from
distutils.tests
import
support
from
distutils.errors
import
DistutilsOptionError
class
InstallLibTestCase
(
support
.
TempdirManager
,
support
.
LoggingSilencer
,
unittest
.
TestCase
):
def
test_dont_write_bytecode
(
self
):
# makes sure byte_compile is not used
pkg_dir
,
dist
=
self
.
create_dist
()
cmd
=
install_lib
(
dist
)
cmd
.
compile
=
1
cmd
.
optimize
=
1
old_dont_write_bytecode
=
sys
.
dont_write_bytecode
sys
.
dont_write_bytecode
=
True
try
:
cmd
.
byte_compile
([])
finally
:
sys
.
dont_write_bytecode
=
old_dont_write_bytecode
self
.
assertTrue
(
'byte-compiling is disabled'
in
self
.
logs
[
0
][
1
])
def
test_suite
():
return
unittest
.
makeSuite
(
InstallLibTestCase
)
if
__name__
==
"__main__"
:
unittest
.
main
(
defaultTest
=
"test_suite"
)
Lib/distutils/tests/test_util.py
0 → 100644
Dosyayı görüntüle @
53bfc1a4
"""Tests for distutils.util."""
import
sys
import
unittest
from
distutils.errors
import
DistutilsPlatformError
,
DistutilsByteCompileError
from
distutils.util
import
byte_compile
class
UtilTestCase
(
unittest
.
TestCase
):
def
test_dont_write_bytecode
(
self
):
# makes sure byte_compile raise a DistutilsError
# if sys.dont_write_bytecode is True
old_dont_write_bytecode
=
sys
.
dont_write_bytecode
sys
.
dont_write_bytecode
=
True
try
:
self
.
assertRaises
(
DistutilsByteCompileError
,
byte_compile
,
[])
finally
:
sys
.
dont_write_bytecode
=
old_dont_write_bytecode
def
test_suite
():
return
unittest
.
makeSuite
(
UtilTestCase
)
if
__name__
==
"__main__"
:
unittest
.
main
(
defaultTest
=
"test_suite"
)
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