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
4847f319
Kaydet (Commit)
4847f319
authored
Eyl 05, 2016
tarafından
Terry Jan Reedy
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Sade Fark
Merge with 3.5
üst
27682d26
fb5ce7ee
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
__init__.py
Lib/test/support/__init__.py
+3
-2
No files found.
Lib/test/support/__init__.py
Dosyayı görüntüle @
4847f319
...
...
@@ -466,6 +466,7 @@ def _is_gui_available():
try
:
from
tkinter
import
Tk
root
=
Tk
()
root
.
withdraw
()
root
.
update
()
root
.
destroy
()
except
Exception
as
e
:
...
...
@@ -490,12 +491,12 @@ def is_resource_enabled(resource):
def
requires
(
resource
,
msg
=
None
):
"""Raise ResourceDenied if the specified resource is not available."""
if
resource
==
'gui'
and
not
_is_gui_available
():
raise
ResourceDenied
(
_is_gui_available
.
reason
)
if
not
is_resource_enabled
(
resource
):
if
msg
is
None
:
msg
=
"Use of the
%
r resource not enabled"
%
resource
raise
ResourceDenied
(
msg
)
if
resource
==
'gui'
and
not
_is_gui_available
():
raise
ResourceDenied
(
_is_gui_available
.
reason
)
def
_requires_unix_version
(
sysname
,
min_version
):
"""Decorator raising SkipTest if the OS is `sysname` and the version is less
...
...
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