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
a0b315f5
Kaydet (Commit)
a0b315f5
authored
Ara 13, 2012
tarafından
Ross Lagerwall
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Issue #16661: Fix the os.getgrouplist() test by not assuming that it
gives the same output as "id -G".
üst
954ac03a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
10 deletions
+6
-10
test_posix.py
Lib/test/test_posix.py
+3
-10
NEWS
Misc/NEWS
+3
-0
No files found.
Lib/test/test_posix.py
Dosyayı görüntüle @
a0b315f5
...
...
@@ -647,17 +647,10 @@ class PosixTester(unittest.TestCase):
@unittest.skipUnless
(
hasattr
(
pwd
,
'getpwuid'
),
"test needs pwd.getpwuid()"
)
@unittest.skipUnless
(
hasattr
(
os
,
'getuid'
),
"test needs os.getuid()"
)
def
test_getgrouplist
(
self
):
with
os
.
popen
(
'id -G'
)
as
idg
:
groups
=
idg
.
read
()
.
strip
()
ret
=
idg
.
close
(
)
user
=
pwd
.
getpwuid
(
os
.
getuid
())[
0
]
group
=
pwd
.
getpwuid
(
os
.
getuid
())[
3
]
self
.
assertIn
(
group
,
posix
.
getgrouplist
(
user
,
group
)
)
if
ret
is
not
None
or
not
groups
:
raise
unittest
.
SkipTest
(
"need working 'id -G'"
)
self
.
assertEqual
(
set
([
int
(
x
)
for
x
in
groups
.
split
()]),
set
(
posix
.
getgrouplist
(
pwd
.
getpwuid
(
os
.
getuid
())[
0
],
pwd
.
getpwuid
(
os
.
getuid
())[
3
])))
@unittest.skipUnless
(
hasattr
(
os
,
'getegid'
),
"test needs os.getegid()"
)
def
test_getgroups
(
self
):
...
...
Misc/NEWS
Dosyayı görüntüle @
a0b315f5
...
...
@@ -301,6 +301,9 @@ Tests
-
Issue
#
16559
:
Add
more
tests
for
the
json
module
,
including
some
from
the
official
test
suite
at
json
.
org
.
Patch
by
Serhiy
Storchaka
.
-
Issue
#
16661
:
Fix
the
`
os
.
getgrouplist
()`
test
by
not
assuming
that
it
gives
the
same
output
as
:
command
:`
id
-
G
`.
-
Issue
#
16115
:
Add
some
tests
for
the
executable
argument
to
subprocess
.
Popen
().
Initial
patch
by
Kushal
Das
.
...
...
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