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
c01cbc42
Kaydet (Commit)
c01cbc42
authored
Haz 01, 2009
tarafından
Tarek Ziadé
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
improved distutils.dist test coverage, pep-8 compliancy
üst
b02ceda3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
51 additions
and
6 deletions
+51
-6
dist.py
Lib/distutils/dist.py
+0
-0
test_dist.py
Lib/distutils/tests/test_dist.py
+51
-6
No files found.
Lib/distutils/dist.py
Dosyayı görüntüle @
c01cbc42
This diff is collapsed.
Click to expand it.
Lib/distutils/tests/test_dist.py
Dosyayı görüntüle @
c01cbc42
# -*- coding:
latin-1
-*-
# -*- coding:
utf8
-*-
"""Tests for distutils.dist."""
"""Tests for distutils.dist."""
import
os
import
os
...
@@ -36,7 +36,9 @@ class TestDistribution(Distribution):
...
@@ -36,7 +36,9 @@ class TestDistribution(Distribution):
return
self
.
_config_files
return
self
.
_config_files
class
DistributionTestCase
(
support
.
TempdirManager
,
unittest
.
TestCase
):
class
DistributionTestCase
(
support
.
TempdirManager
,
support
.
LoggingSilencer
,
unittest
.
TestCase
):
def
setUp
(
self
):
def
setUp
(
self
):
super
(
DistributionTestCase
,
self
)
.
setUp
()
super
(
DistributionTestCase
,
self
)
.
setUp
()
...
@@ -106,11 +108,11 @@ class DistributionTestCase(support.TempdirManager, unittest.TestCase):
...
@@ -106,11 +108,11 @@ class DistributionTestCase(support.TempdirManager, unittest.TestCase):
my_file
=
os
.
path
.
join
(
tmp_dir
,
'f'
)
my_file
=
os
.
path
.
join
(
tmp_dir
,
'f'
)
klass
=
Distribution
klass
=
Distribution
dist
=
klass
(
attrs
=
{
'author'
:
u'Mister Caf'
,
dist
=
klass
(
attrs
=
{
'author'
:
u'Mister Caf
é
'
,
'name'
:
'my.package'
,
'name'
:
'my.package'
,
'maintainer'
:
u'Caf Junior'
,
'maintainer'
:
u'Caf
é
Junior'
,
'description'
:
u'Caf
torrfi
'
,
'description'
:
u'Caf
é torréfié
'
,
'long_description'
:
u'H
hh
'
})
'long_description'
:
u'H
éhéhé
'
})
# let's make sure the file can be written
# let's make sure the file can be written
...
@@ -151,6 +153,49 @@ class DistributionTestCase(support.TempdirManager, unittest.TestCase):
...
@@ -151,6 +153,49 @@ class DistributionTestCase(support.TempdirManager, unittest.TestCase):
self
.
assertEquals
(
len
(
warns
),
0
)
self
.
assertEquals
(
len
(
warns
),
0
)
def
test_finalize_options
(
self
):
attrs
=
{
'keywords'
:
'one,two'
,
'platforms'
:
'one,two'
}
dist
=
Distribution
(
attrs
=
attrs
)
dist
.
finalize_options
()
# finalize_option splits platforms and keywords
self
.
assertEquals
(
dist
.
metadata
.
platforms
,
[
'one'
,
'two'
])
self
.
assertEquals
(
dist
.
metadata
.
keywords
,
[
'one'
,
'two'
])
def
test_show_help
(
self
):
class
FancyGetopt
(
object
):
def
__init__
(
self
):
self
.
count
=
0
def
set_option_table
(
self
,
*
args
):
pass
def
print_help
(
self
,
*
args
):
self
.
count
+=
1
parser
=
FancyGetopt
()
dist
=
Distribution
()
dist
.
commands
=
[
'sdist'
]
dist
.
script_name
=
'setup.py'
dist
.
_show_help
(
parser
)
self
.
assertEquals
(
parser
.
count
,
3
)
def
test_get_command_packages
(
self
):
dist
=
Distribution
()
self
.
assertEquals
(
dist
.
command_packages
,
None
)
cmds
=
dist
.
get_command_packages
()
self
.
assertEquals
(
cmds
,
[
'distutils.command'
])
self
.
assertEquals
(
dist
.
command_packages
,
[
'distutils.command'
])
dist
.
command_packages
=
'one,two'
cmds
=
dist
.
get_command_packages
()
self
.
assertEquals
(
cmds
,
[
'distutils.command'
,
'one'
,
'two'
])
class
MetadataTestCase
(
support
.
TempdirManager
,
support
.
EnvironGuard
,
class
MetadataTestCase
(
support
.
TempdirManager
,
support
.
EnvironGuard
,
unittest
.
TestCase
):
unittest
.
TestCase
):
...
...
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