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
5819dcc0
Kaydet (Commit)
5819dcc0
authored
Eki 09, 2011
tarafından
Éric Araujo
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Add tests for Unicode handling in distutils’ check and register (#13114)
üst
8af607b4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
3 deletions
+30
-3
test_check.py
Lib/distutils/tests/test_check.py
+11
-2
test_register.py
Lib/distutils/tests/test_register.py
+19
-1
No files found.
Lib/distutils/tests/test_check.py
Dosyayı görüntüle @
5819dcc0
...
...
@@ -46,6 +46,15 @@ class CheckTestCase(support.LoggingSilencer,
cmd
=
self
.
_run
(
metadata
,
strict
=
1
)
self
.
assertEqual
(
cmd
.
_warnings
,
0
)
# now a test with non-ASCII characters
metadata
=
{
'url'
:
'xxx'
,
'author'
:
'
\u00c9
ric'
,
'author_email'
:
'xxx'
,
'name'
:
'xxx'
,
'version'
:
'xxx'
,
'description'
:
'Something about esszet
\u00df
'
,
'long_description'
:
'More things about esszet
\u00df
'
}
cmd
=
self
.
_run
(
metadata
)
self
.
assertEqual
(
cmd
.
_warnings
,
0
)
def
test_check_document
(
self
):
if
not
HAS_DOCUTILS
:
# won't test without docutils
return
...
...
@@ -80,8 +89,8 @@ class CheckTestCase(support.LoggingSilencer,
self
.
assertRaises
(
DistutilsSetupError
,
self
.
_run
,
metadata
,
**
{
'strict'
:
1
,
'restructuredtext'
:
1
})
# and non-broken rest
metadata
[
'long_description'
]
=
'title
\n
=====
\n\n
test'
# and non-broken rest
, including a non-ASCII character to test #12114
metadata
[
'long_description'
]
=
'title
\n
=====
\n\n
test
\u00df
'
cmd
=
self
.
_run
(
metadata
,
strict
=
1
,
restructuredtext
=
1
)
self
.
assertEqual
(
cmd
.
_warnings
,
0
)
...
...
Lib/distutils/tests/test_register.py
Dosyayı görüntüle @
5819dcc0
...
...
@@ -214,7 +214,7 @@ class RegisterTestCase(PyPIRCCommandTestCase):
# metadata are OK but long_description is broken
metadata
=
{
'url'
:
'xxx'
,
'author'
:
'xxx'
,
'author_email'
:
'
xxx
'
,
'author_email'
:
'
éxéxé
'
,
'name'
:
'xxx'
,
'version'
:
'xxx'
,
'long_description'
:
'title
\n
==
\n\n
text'
}
...
...
@@ -247,6 +247,24 @@ class RegisterTestCase(PyPIRCCommandTestCase):
finally
:
del
register_module
.
input
# and finally a Unicode test (bug #12114)
metadata
=
{
'url'
:
'xxx'
,
'author'
:
'
\u00c9
ric'
,
'author_email'
:
'xxx'
,
'name'
:
'xxx'
,
'version'
:
'xxx'
,
'description'
:
'Something about esszet
\u00df
'
,
'long_description'
:
'More things about esszet
\u00df
'
}
cmd
=
self
.
_get_cmd
(
metadata
)
cmd
.
ensure_finalized
()
cmd
.
strict
=
1
inputs
=
Inputs
(
'1'
,
'tarek'
,
'y'
)
register_module
.
input
=
inputs
.
__call__
# let's run the command
try
:
cmd
.
run
()
finally
:
del
register_module
.
input
def
test_check_metadata_deprecated
(
self
):
# makes sure make_metadata is deprecated
cmd
=
self
.
_get_cmd
()
...
...
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