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
f852fff8
Kaydet (Commit)
f852fff8
authored
Ara 13, 2016
tarafından
Xavier de Gaye
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Sade Fark
Issue #28759: Merge 3.6.
üst
d0c2b5b0
3a4e9893
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
22 additions
and
3 deletions
+22
-3
eintr_tester.py
Lib/test/eintrdata/eintr_tester.py
+2
-0
__init__.py
Lib/test/support/__init__.py
+2
-1
test_genericpath.py
Lib/test/test_genericpath.py
+3
-0
test_pathlib.py
Lib/test/test_pathlib.py
+2
-0
test_posix.py
Lib/test/test_posix.py
+6
-0
test_shutil.py
Lib/test/test_shutil.py
+5
-1
test_stat.py
Lib/test/test_stat.py
+2
-1
No files found.
Lib/test/eintrdata/eintr_tester.py
Dosyayı görüntüle @
f852fff8
...
...
@@ -20,6 +20,7 @@ import time
import
unittest
from
test
import
support
android_not_root
=
support
.
android_not_root
@contextlib.contextmanager
def
kill_on_error
(
proc
):
...
...
@@ -311,6 +312,7 @@ class SocketEINTRTest(EINTRBaseTest):
# https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=203162
@support.requires_freebsd_version
(
10
,
3
)
@unittest.skipUnless
(
hasattr
(
os
,
'mkfifo'
),
'needs mkfifo()'
)
@unittest.skipIf
(
android_not_root
,
"mkfifo not allowed, non root user"
)
def
_test_open
(
self
,
do_open_close_reader
,
do_open_close_writer
):
filename
=
support
.
TESTFN
...
...
Lib/test/support/__init__.py
Dosyayı görüntüle @
f852fff8
...
...
@@ -93,7 +93,7 @@ __all__ = [
"check__all__"
,
"requires_android_level"
,
"requires_multiprocessing_queue"
,
# sys
"is_jython"
,
"is_android"
,
"check_impl_detail"
,
"unix_shell"
,
"setswitchinterval"
,
"setswitchinterval"
,
"android_not_root"
,
# network
"HOST"
,
"IPV6_ENABLED"
,
"find_unused_port"
,
"bind_port"
,
"open_urlresource"
,
# processes
...
...
@@ -774,6 +774,7 @@ try:
except
AttributeError
:
# sys.getandroidapilevel() is only available on Android
is_android
=
False
android_not_root
=
(
is_android
and
os
.
geteuid
()
!=
0
)
if
sys
.
platform
!=
'win32'
:
unix_shell
=
'/system/bin/sh'
if
is_android
else
'/bin/sh'
...
...
Lib/test/test_genericpath.py
Dosyayı görüntüle @
f852fff8
...
...
@@ -8,6 +8,7 @@ import sys
import
unittest
import
warnings
from
test
import
support
android_not_root
=
support
.
android_not_root
def
create_file
(
filename
,
data
=
b
'foo'
):
...
...
@@ -212,6 +213,7 @@ class GenericTest:
def
test_samefile_on_symlink
(
self
):
self
.
_test_samefile_on_link_func
(
os
.
symlink
)
@unittest.skipIf
(
android_not_root
,
"hard links not allowed, non root user"
)
def
test_samefile_on_link
(
self
):
self
.
_test_samefile_on_link_func
(
os
.
link
)
...
...
@@ -251,6 +253,7 @@ class GenericTest:
def
test_samestat_on_symlink
(
self
):
self
.
_test_samestat_on_link_func
(
os
.
symlink
)
@unittest.skipIf
(
android_not_root
,
"hard links not allowed, non root user"
)
def
test_samestat_on_link
(
self
):
self
.
_test_samestat_on_link_func
(
os
.
link
)
...
...
Lib/test/test_pathlib.py
Dosyayı görüntüle @
f852fff8
...
...
@@ -10,6 +10,7 @@ import tempfile
import
unittest
from
test
import
support
android_not_root
=
support
.
android_not_root
TESTFN
=
support
.
TESTFN
try
:
...
...
@@ -1864,6 +1865,7 @@ class _BasePathTest(object):
self
.
assertFalse
((
P
/
'fileA'
/
'bah'
)
.
is_fifo
())
@unittest.skipUnless
(
hasattr
(
os
,
"mkfifo"
),
"os.mkfifo() required"
)
@unittest.skipIf
(
android_not_root
,
"mkfifo not allowed, non root user"
)
def
test_is_fifo_true
(
self
):
P
=
self
.
cls
(
BASE
,
'myfifo'
)
os
.
mkfifo
(
str
(
P
))
...
...
Lib/test/test_posix.py
Dosyayı görüntüle @
f852fff8
"Test posix functions"
from
test
import
support
android_not_root
=
support
.
android_not_root
# Skip these tests if there is no posix module.
posix
=
support
.
import_module
(
'posix'
)
...
...
@@ -422,6 +423,7 @@ class PosixTester(unittest.TestCase):
posix
.
stat
,
list
(
os
.
fsencode
(
support
.
TESTFN
)))
@unittest.skipUnless
(
hasattr
(
posix
,
'mkfifo'
),
"don't have mkfifo()"
)
@unittest.skipIf
(
android_not_root
,
"mkfifo not allowed, non root user"
)
def
test_mkfifo
(
self
):
support
.
unlink
(
support
.
TESTFN
)
posix
.
mkfifo
(
support
.
TESTFN
,
stat
.
S_IRUSR
|
stat
.
S_IWUSR
)
...
...
@@ -429,6 +431,7 @@ class PosixTester(unittest.TestCase):
@unittest.skipUnless
(
hasattr
(
posix
,
'mknod'
)
and
hasattr
(
stat
,
'S_IFIFO'
),
"don't have mknod()/S_IFIFO"
)
@unittest.skipIf
(
android_not_root
,
"mknod not allowed, non root user"
)
def
test_mknod
(
self
):
# Test using mknod() to create a FIFO (the only use specified
# by POSIX).
...
...
@@ -907,6 +910,7 @@ class PosixTester(unittest.TestCase):
posix
.
close
(
f
)
@unittest.skipUnless
(
os
.
link
in
os
.
supports_dir_fd
,
"test needs dir_fd support in os.link()"
)
@unittest.skipIf
(
android_not_root
,
"hard link not allowed, non root user"
)
def
test_link_dir_fd
(
self
):
f
=
posix
.
open
(
posix
.
getcwd
(),
posix
.
O_RDONLY
)
try
:
...
...
@@ -930,6 +934,7 @@ class PosixTester(unittest.TestCase):
@unittest.skipUnless
((
os
.
mknod
in
os
.
supports_dir_fd
)
and
hasattr
(
stat
,
'S_IFIFO'
),
"test requires both stat.S_IFIFO and dir_fd support for os.mknod()"
)
@unittest.skipIf
(
android_not_root
,
"mknod not allowed, non root user"
)
def
test_mknod_dir_fd
(
self
):
# Test using mknodat() to create a FIFO (the only use specified
# by POSIX).
...
...
@@ -1013,6 +1018,7 @@ class PosixTester(unittest.TestCase):
posix
.
close
(
f
)
@unittest.skipUnless
(
os
.
mkfifo
in
os
.
supports_dir_fd
,
"test needs dir_fd support in os.mkfifo()"
)
@unittest.skipIf
(
android_not_root
,
"mkfifo not allowed, non root user"
)
def
test_mkfifo_dir_fd
(
self
):
support
.
unlink
(
support
.
TESTFN
)
f
=
posix
.
open
(
posix
.
getcwd
(),
posix
.
O_RDONLY
)
...
...
Lib/test/test_shutil.py
Dosyayı görüntüle @
f852fff8
...
...
@@ -22,7 +22,8 @@ import tarfile
import
warnings
from
test
import
support
from
test.support
import
TESTFN
,
check_warnings
,
captured_stdout
,
requires_zlib
from
test.support
import
(
TESTFN
,
check_warnings
,
captured_stdout
,
requires_zlib
,
android_not_root
)
try
:
import
bz2
...
...
@@ -787,6 +788,7 @@ class TestShutil(unittest.TestCase):
@unittest.skipIf
(
os
.
name
==
'nt'
,
'temporarily disabled on Windows'
)
@unittest.skipUnless
(
hasattr
(
os
,
'link'
),
'requires os.link'
)
@unittest.skipIf
(
android_not_root
,
"hard links not allowed, non root user"
)
def
test_dont_copy_file_onto_link_to_itself
(
self
):
# bug 851123.
os
.
mkdir
(
TESTFN
)
...
...
@@ -839,6 +841,7 @@ class TestShutil(unittest.TestCase):
# Issue #3002: copyfile and copytree block indefinitely on named pipes
@unittest.skipUnless
(
hasattr
(
os
,
"mkfifo"
),
'requires os.mkfifo()'
)
@unittest.skipIf
(
android_not_root
,
"mkfifo not allowed, non root user"
)
def
test_copyfile_named_pipe
(
self
):
os
.
mkfifo
(
TESTFN
)
try
:
...
...
@@ -849,6 +852,7 @@ class TestShutil(unittest.TestCase):
finally
:
os
.
remove
(
TESTFN
)
@unittest.skipIf
(
android_not_root
,
"mkfifo not allowed, non root user"
)
@unittest.skipUnless
(
hasattr
(
os
,
"mkfifo"
),
'requires os.mkfifo()'
)
@support.skip_unless_symlink
def
test_copytree_named_pipe
(
self
):
...
...
Lib/test/test_stat.py
Dosyayı görüntüle @
f852fff8
import
unittest
import
os
import
sys
from
test.support
import
TESTFN
,
import_fresh_module
from
test.support
import
TESTFN
,
import_fresh_module
,
android_not_root
c_stat
=
import_fresh_module
(
'stat'
,
fresh
=
[
'_stat'
])
py_stat
=
import_fresh_module
(
'stat'
,
blocked
=
[
'_stat'
])
...
...
@@ -168,6 +168,7 @@ class TestFilemode:
self
.
assertS_IS
(
"LNK"
,
st_mode
)
@unittest.skipUnless
(
hasattr
(
os
,
'mkfifo'
),
'os.mkfifo not available'
)
@unittest.skipIf
(
android_not_root
,
"mkfifo not allowed, non root user"
)
def
test_fifo
(
self
):
os
.
mkfifo
(
TESTFN
,
0
o700
)
st_mode
,
modestr
=
self
.
get_mode
()
...
...
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