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
16b2e4f5
Kaydet (Commit)
16b2e4f5
authored
Nis 20, 2015
tarafından
Serhiy Storchaka
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Issue #23842: Added tests for os.major(), os.minor() and os.makedev().
üst
cdbe2990
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
0 deletions
+30
-0
test_posix.py
Lib/test/test_posix.py
+30
-0
No files found.
Lib/test/test_posix.py
Dosyayı görüntüle @
16b2e4f5
...
...
@@ -443,6 +443,36 @@ class PosixTester(unittest.TestCase):
else
:
self
.
assertTrue
(
stat
.
S_ISFIFO
(
posix
.
stat
(
support
.
TESTFN
)
.
st_mode
))
@unittest.skipUnless
(
hasattr
(
posix
,
'stat'
),
'test needs posix.stat()'
)
@unittest.skipUnless
(
hasattr
(
posix
,
'makedev'
),
'test needs posix.makedev()'
)
def
test_makedev
(
self
):
st
=
posix
.
stat
(
support
.
TESTFN
)
dev
=
st
.
st_dev
self
.
assertIsInstance
(
dev
,
int
)
self
.
assertGreaterEqual
(
dev
,
0
)
major
=
posix
.
major
(
dev
)
self
.
assertIsInstance
(
major
,
int
)
self
.
assertGreaterEqual
(
major
,
0
)
self
.
assertEqual
(
posix
.
major
(
dev
),
major
)
self
.
assertRaises
(
TypeError
,
posix
.
major
,
float
(
dev
))
self
.
assertRaises
(
TypeError
,
posix
.
major
)
self
.
assertRaises
((
ValueError
,
OverflowError
),
posix
.
major
,
-
1
)
minor
=
posix
.
minor
(
dev
)
self
.
assertIsInstance
(
minor
,
int
)
self
.
assertGreaterEqual
(
minor
,
0
)
self
.
assertEqual
(
posix
.
minor
(
dev
),
minor
)
self
.
assertRaises
(
TypeError
,
posix
.
minor
,
float
(
dev
))
self
.
assertRaises
(
TypeError
,
posix
.
minor
)
self
.
assertRaises
((
ValueError
,
OverflowError
),
posix
.
minor
,
-
1
)
self
.
assertEqual
(
posix
.
makedev
(
major
,
minor
),
dev
)
self
.
assertRaises
(
TypeError
,
posix
.
makedev
,
float
(
major
),
minor
)
self
.
assertRaises
(
TypeError
,
posix
.
makedev
,
major
,
float
(
minor
))
self
.
assertRaises
(
TypeError
,
posix
.
makedev
,
major
)
self
.
assertRaises
(
TypeError
,
posix
.
makedev
)
def
_test_all_chown_common
(
self
,
chown_func
,
first_param
,
stat_func
):
"""Common code for chown, fchown and lchown tests."""
def
check_stat
(
uid
,
gid
):
...
...
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