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
4dc31939
Kaydet (Commit)
4dc31939
authored
Tem 20, 2009
tarafından
Brett Cannon
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Remove custom test-skipping code in importlib tests for unittest code.
üst
3c273848
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
13 deletions
+14
-13
util.py
Lib/importlib/test/util.py
+14
-13
No files found.
Lib/importlib/test/util.py
Dosyayı görüntüle @
4dc31939
...
...
@@ -6,21 +6,22 @@ import unittest
import
sys
def
case_insensitive_tests
(
class_
):
CASE_INSENSITIVE_FS
=
True
# Windows is the only OS that is *always* case-insensitive
# (OS X *can* be case-sensitive).
if
sys
.
platform
not
in
(
'win32'
,
'cygwin'
):
changed_name
=
__file__
.
upper
()
if
changed_name
==
__file__
:
changed_name
=
__file__
.
lower
()
if
not
os
.
path
.
exists
(
changed_name
):
CASE_INSENSITIVE_FS
=
False
def
case_insensitive_tests
(
test
):
"""Class decorator that nullifies tests requiring a case-insensitive
file system."""
# Windows is the only OS that is *always* case-insensitive
# (OS X *can* be case-sensitive).
if
sys
.
platform
not
in
(
'win32'
,
'cygwin'
):
changed_name
=
__file__
.
upper
()
if
changed_name
==
__file__
:
changed_name
=
__file__
.
lower
()
if
os
.
path
.
exists
(
changed_name
):
return
class_
else
:
return
unittest
.
TestCase
else
:
return
class_
return
unittest
.
skipIf
(
not
CASE_INSENSITIVE_FS
,
"requires a case-insensitive filesystem"
)(
test
)
@contextmanager
...
...
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