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
3d5f7e83
Kaydet (Commit)
3d5f7e83
authored
Ara 04, 2000
tarafından
Fred Drake
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Add test cases for ConfigParser.remove_option() behavior. This includes
coverage to ensure bug #124324 does not re-surface.
üst
ff4a23bb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
0 deletions
+24
-0
test_cfgparser.py
Lib/test/test_cfgparser.py
+24
-0
No files found.
Lib/test/test_cfgparser.py
Dosyayı görüntüle @
3d5f7e83
import
ConfigParser
import
StringIO
from
test_support
import
TestFailed
def
basic
(
src
):
print
print
"Testing basic accessors..."
...
...
@@ -25,6 +28,27 @@ def basic(src):
else
:
print
'__name__ "option" properly hidden by the API.'
# Make sure the right things happen for remove_option();
# added to include check for SourceForge bug #123324:
if
not
cf
.
remove_option
(
'Foo Bar'
,
'foo'
):
raise
TestFailed
(
"remove_option() failed to report existance of option"
)
if
cf
.
has_option
(
'Foo Bar'
,
'foo'
):
raise
TestFailed
(
"remove_option() failed to remove option"
)
if
cf
.
remove_option
(
'Foo Bar'
,
'foo'
):
raise
TestFailed
(
"remove_option() failed to report non-existance of option"
" that was removed"
)
try
:
cf
.
remove_option
(
'No Such Section'
,
'foo'
)
except
ConfigParser
.
NoSectionError
:
pass
else
:
raise
TestFailed
(
"remove_option() failed to report non-existance of option"
" that never existed"
)
def
interpolation
(
src
):
print
print
"Testing value interpolation..."
...
...
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