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
8d172343
Kaydet (Commit)
8d172343
authored
Ock 09, 2012
tarafından
Terry Jan Reedy
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Sade Fark
Merge with 3.2
üst
dc3044c7
ee91e099
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
+6
-4
test_argparse.py
Lib/test/test_argparse.py
+6
-4
No files found.
Lib/test/test_argparse.py
Dosyayı görüntüle @
8d172343
...
@@ -2170,8 +2170,9 @@ class TestParentParsers(TestCase):
...
@@ -2170,8 +2170,9 @@ class TestParentParsers(TestCase):
parents
=
[
self
.
abcd_parent
,
self
.
wxyz_parent
]
parents
=
[
self
.
abcd_parent
,
self
.
wxyz_parent
]
parser
=
ErrorRaisingArgumentParser
(
parents
=
parents
)
parser
=
ErrorRaisingArgumentParser
(
parents
=
parents
)
parser_help
=
parser
.
format_help
()
parser_help
=
parser
.
format_help
()
progname
=
self
.
main_program
self
.
assertEqual
(
parser_help
,
textwrap
.
dedent
(
'''
\
self
.
assertEqual
(
parser_help
,
textwrap
.
dedent
(
'''
\
usage: {}
[-h] [-b B] [--d D] [--w W] [-y Y] a z
usage: {}
{}
[-h] [-b B] [--d D] [--w W] [-y Y] a z
positional arguments:
positional arguments:
a
a
...
@@ -2187,7 +2188,7 @@ class TestParentParsers(TestCase):
...
@@ -2187,7 +2188,7 @@ class TestParentParsers(TestCase):
x:
x:
-y Y
-y Y
'''
.
format
(
self
.
main_program
)))
'''
.
format
(
progname
,
' '
if
progname
else
''
)))
def
test_groups_parents
(
self
):
def
test_groups_parents
(
self
):
parent
=
ErrorRaisingArgumentParser
(
add_help
=
False
)
parent
=
ErrorRaisingArgumentParser
(
add_help
=
False
)
...
@@ -2203,8 +2204,9 @@ class TestParentParsers(TestCase):
...
@@ -2203,8 +2204,9 @@ class TestParentParsers(TestCase):
[
'-y'
,
'Y'
,
'-z'
,
'Z'
])
[
'-y'
,
'Y'
,
'-z'
,
'Z'
])
parser_help
=
parser
.
format_help
()
parser_help
=
parser
.
format_help
()
progname
=
self
.
main_program
self
.
assertEqual
(
parser_help
,
textwrap
.
dedent
(
'''
\
self
.
assertEqual
(
parser_help
,
textwrap
.
dedent
(
'''
\
usage: {}
[-h] [-w W] [-x X] [-y Y | -z Z]
usage: {}
{}
[-h] [-w W] [-x X] [-y Y | -z Z]
optional arguments:
optional arguments:
-h, --help show this help message and exit
-h, --help show this help message and exit
...
@@ -2216,7 +2218,7 @@ class TestParentParsers(TestCase):
...
@@ -2216,7 +2218,7 @@ class TestParentParsers(TestCase):
-w W
-w W
-x X
-x X
'''
.
format
(
self
.
main_program
)))
'''
.
format
(
progname
,
' '
if
progname
else
''
)))
# ==============================
# ==============================
# Mutually exclusive group tests
# Mutually exclusive group tests
...
...
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