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
150a6640
Kaydet (Commit)
150a6640
authored
Şub 28, 2001
tarafından
Jeremy Hylton
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fix filter for SyntaxErrors
üst
3da989c6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
test_global.py
Lib/test/test_global.py
+4
-4
No files found.
Lib/test/test_global.py
Dosyayı görüntüle @
150a6640
...
@@ -4,15 +4,15 @@ from test_support import check_syntax
...
@@ -4,15 +4,15 @@ from test_support import check_syntax
import
warnings
import
warnings
warnings
.
filterwarnings
(
"error"
,
category
=
SyntaxWarning
,
module
=
__name__
)
warnings
.
filterwarnings
(
"error"
,
module
=
"<test code>"
)
def
compile_and_catch_warning
(
text
):
def
compile_and_catch_warning
(
text
):
try
:
try
:
compile
(
text
,
"<test code>"
,
"exec"
)
compile
(
text
,
"<test code>"
,
"exec"
)
except
Syntax
Warning
,
msg
:
except
Syntax
Error
,
msg
:
print
"got Syntax
Warning
as expected"
print
"got Syntax
Error
as expected"
else
:
else
:
print
"expected Syntax
Warning
"
print
"expected Syntax
Error
"
prog_text_1
=
"""
prog_text_1
=
"""
def wrong1():
def wrong1():
...
...
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