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
85ac726a
Kaydet (Commit)
85ac726a
authored
Ock 06, 2018
tarafından
Paul Ganssle
Kaydeden (comit)
Andrew Svetlov
Ock 06, 2018
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Cleanup grammar in unittest.mock.seal documentation (#5107)
üst
9f1e5f1b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
unittest.mock.rst
Doc/library/unittest.mock.rst
+4
-4
No files found.
Doc/library/unittest.mock.rst
Dosyayı görüntüle @
85ac726a
...
@@ -2370,12 +2370,12 @@ Sealing mocks
...
@@ -2370,12 +2370,12 @@ Sealing mocks
.. function:: seal(mock)
.. function:: seal(mock)
Seal will disable the creation of mock children by preventing
to get or set
Seal will disable the creation of mock children by preventing
getting or setting
any new attribute on the sealed mock. The sealing process is performed recursively.
of
any new attribute on the sealed mock. The sealing process is performed recursively.
If a mock instance is assigned to an attribute instead of being dynamically created
If a mock instance is assigned to an attribute instead of being dynamically created
it won't be considered in the sealing chain. This allows
to prevent seal from fixing
it won't be considered in the sealing chain. This allows
one to prevent seal from
part of the mock object.
fixing
part of the mock object.
>>> mock = Mock()
>>> mock = Mock()
>>> mock.submock.attribute1 = 2
>>> mock.submock.attribute1 = 2
...
...
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