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
2298d538
Kaydet (Commit)
2298d538
authored
Mar 20, 2010
tarafından
Brett Cannon
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Clean up warnings filter use in test_global by no longer having it be a
module-level manipulation of the filter.
üst
41a08bcb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
2 deletions
+11
-2
test_global.py
Lib/test/test_global.py
+11
-2
No files found.
Lib/test/test_global.py
Dosyayı görüntüle @
2298d538
"""Verify that warnings are issued for global statements following use."""
from
test.support
import
run_unittest
,
check_syntax_error
from
test.support
import
run_unittest
,
check_syntax_error
,
check_warnings
import
unittest
import
warnings
warnings
.
filterwarnings
(
"error"
,
module
=
"<test string>"
)
class
GlobalTests
(
unittest
.
TestCase
):
def
setUp
(
self
):
self
.
_warnings_manager
=
check_warnings
()
self
.
_warnings_manager
.
__enter__
()
warnings
.
filterwarnings
(
"error"
,
module
=
"<test string>"
)
def
tearDown
(
self
):
self
.
_warnings_manager
.
__exit__
(
None
,
None
,
None
)
def
test1
(
self
):
prog_text_1
=
"""
\
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