Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
D
django
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
django
Commits
654d8e96
Kaydet (Commit)
654d8e96
authored
Mar 27, 2013
tarafından
Jacob Kaplan-Moss
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fixed logging-related test failure introduced by
e79b857a
.
üst
f6989e55
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
0 deletions
+9
-0
tests.py
tests/logging_tests/tests.py
+9
-0
No files found.
tests/logging_tests/tests.py
Dosyayı görüntüle @
654d8e96
...
...
@@ -93,6 +93,12 @@ class WarningLoggerTests(TestCase):
and captured to the logging system
"""
def
setUp
(
self
):
# If tests are invoke with "-Wall" (or any -W flag actually) then
# warning logging gets disabled (see django/conf/__init__.py). However,
# these tests expect warnings to be logged, so manually force warnings
# to the logs.
logging
.
captureWarnings
(
True
)
# this convoluted setup is to avoid printing this deprecation to
# stderr during test running - as the test runner forces deprecations
# to be displayed at the global py.warnings level
...
...
@@ -108,6 +114,9 @@ class WarningLoggerTests(TestCase):
for
i
,
handler
in
enumerate
(
self
.
logger
.
handlers
):
self
.
logger
.
handlers
[
i
]
.
stream
=
self
.
old_streams
[
i
]
# Reset warnings state.
logging
.
captureWarnings
(
False
)
@override_settings
(
DEBUG
=
True
)
def
test_warnings_capture
(
self
):
warnings
.
warn
(
'Foo Deprecated'
,
DeprecationWarning
)
...
...
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