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
2b6c2faa
Kaydet (Commit)
2b6c2faa
authored
Ara 11, 1996
tarafından
Guido van Rossum
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Rewrite without using try-except to break out of two loops.
üst
870d5c67
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
17 deletions
+18
-17
test_nis.py
Lib/test/test_nis.py
+18
-17
No files found.
Lib/test/test_nis.py
Dosyayı görüntüle @
2b6c2faa
...
...
@@ -5,21 +5,22 @@ if __name__ == '__main__':
verbose
=
1
maps
=
nis
.
maps
()
try
:
for
nismap
in
maps
:
done
=
0
for
nismap
in
maps
:
if
verbose
:
print
nismap
mapping
=
nis
.
cat
(
nismap
)
for
k
,
v
in
mapping
.
items
():
if
verbose
:
print
nismap
mapping
=
nis
.
cat
(
nismap
)
for
k
,
v
in
mapping
.
items
():
if
verbose
:
print
' '
,
k
,
v
if
not
k
:
continue
if
nis
.
match
(
k
,
nismap
)
<>
v
:
print
"NIS match failed for key `
%
s' in map `
%
s'"
%
(
k
,
nismap
)
else
:
# just test the one key, otherwise this test could take a
# very long time
raise
'done'
except
'done'
:
pass
print
' '
,
k
,
v
if
not
k
:
continue
if
nis
.
match
(
k
,
nismap
)
<>
v
:
print
"NIS match failed for key `
%
s' in map `
%
s'"
%
(
k
,
nismap
)
else
:
# just test the one key, otherwise this test could take a
# very long time
done
=
1
break
if
done
:
break
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