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
5b811bee
Kaydet (Commit)
5b811bee
authored
May 18, 2001
tarafından
Fred Drake
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Simple conversion to PyUnit.
üst
d6573039
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
23 deletions
+20
-23
test_grp.py
Lib/test/test_grp.py
+20
-23
No files found.
Lib/test/test_grp.py
Dosyayı görüntüle @
5b811bee
#! /usr/bin/env python
"""Test script for the grp module."""
"""Test script for the grp module
Roger E. Masse
# XXX This really needs some work, but what are the expected invariants?
"""
import
grp
import
grp
from
test_support
import
verbose
import
test_support
import
unittest
groups
=
grp
.
getgrall
()
if
verbose
:
print
'Groups:'
class
GroupDatabaseTestCase
(
unittest
.
TestCase
):
for
group
in
groups
:
print
group
def
setUp
(
self
):
self
.
groups
=
grp
.
getgrall
()
if
not
groups
:
if
verbose
:
def
test_getgrgid
(
self
):
print
"Empty Group Database -- no further tests of grp module possible"
entry
=
grp
.
getgrgid
(
self
.
groups
[
0
][
2
])
else
:
group
=
grp
.
getgrgid
(
groups
[
0
][
2
])
def
test_getgrnam
(
self
):
if
verbose
:
entry
=
grp
.
getgrnam
(
self
.
groups
[
0
][
0
])
print
'Group Entry for GID
%
d:
%
s'
%
(
groups
[
0
][
2
],
group
)
group
=
grp
.
getgrnam
(
groups
[
0
][
0
])
test_support
.
run_unittest
(
GroupDatabaseTestCase
)
if
verbose
:
print
'Group Entry for group
%
s:
%
s'
%
(
groups
[
0
][
0
],
group
)
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