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
6159e095
Kaydet (Commit)
6159e095
authored
Tem 16, 2012
tarafından
R David Murray
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
#4640: Add optparse tests for '-xxx' invalid when defining options.
Patch by Aaron (hac.man).
üst
7aa2c8ba
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
0 deletions
+16
-0
test_optparse.py
Lib/test/test_optparse.py
+16
-0
No files found.
Lib/test/test_optparse.py
Dosyayı görüntüle @
6159e095
...
...
@@ -318,6 +318,22 @@ class TestOptionChecks(BaseTest):
[
"-b"
],
{
'action'
:
'store'
,
'callback_kwargs'
:
'foo'
})
def
test_no_single_dash
(
self
):
self
.
assertOptionError
(
"invalid long option string '-debug': "
"must start with --, followed by non-dash"
,
[
"-debug"
])
self
.
assertOptionError
(
"option -d: invalid long option string '-debug': must start with"
" --, followed by non-dash"
,
[
"-d"
,
"-debug"
])
self
.
assertOptionError
(
"invalid long option string '-debug': "
"must start with --, followed by non-dash"
,
[
"-debug"
,
"--debug"
])
class
TestOptionParser
(
BaseTest
):
def
setUp
(
self
):
self
.
parser
=
OptionParser
()
...
...
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