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
77f50c9c
Kaydet (Commit)
77f50c9c
authored
Ara 22, 2015
tarafından
Tim Graham
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fixed #25948 -- Added guidelines for SimpleTestCase.assertRaisesMessage() usage.
üst
0224f1cb
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
3 deletions
+9
-3
coding-style.txt
docs/internals/contributing/writing-code/coding-style.txt
+6
-0
tools.txt
docs/topics/testing/tools.txt
+3
-3
No files found.
docs/internals/contributing/writing-code/coding-style.txt
Dosyayı görüntüle @
77f50c9c
...
...
@@ -45,6 +45,12 @@ Python style
"""
...
* In tests, use :meth:`~django.test.SimpleTestCase.assertRaisesMessage` instead
of :meth:`~unittest.TestCase.assertRaises` so you can check the exception
message. Use :meth:`~unittest.TestCase.assertRaisesRegex`
(``six.assertRaisesRegex()`` as long as we support Python 2) only if you need
to use regular expression matching.
Imports
-------
...
...
docs/topics/testing/tools.txt
Dosyayı görüntüle @
77f50c9c
...
...
@@ -1345,9 +1345,9 @@ your test suite.
Asserts that execution of ``callable`` raises ``expected_exception`` and
that ``expected_message`` is found in the exception's message. Any other
outcome is reported as a failure.
Similar to unittest's
:meth:`
~
unittest.TestCase.assertRaisesRegex` with the difference that
``expected_message`` isn't a regular expression.
outcome is reported as a failure.
It's a simpler version of
:meth:`unittest.TestCase.assertRaisesRegex` with the difference that
``expected_message`` isn't
treated as
a regular expression.
If only the ``expected_exception`` and ``expected_message`` parameters are
given, returns a context manager so that the code being tested can be
...
...
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