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
516d8053
Kaydet (Commit)
516d8053
authored
Kas 12, 2011
tarafından
Petri Lehtinen
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Sade Fark
Merge branch 3.2
üst
31b92a53
c153cd3d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
3 deletions
+9
-3
test_mailbox.py
Lib/test/test_mailbox.py
+9
-3
No files found.
Lib/test/test_mailbox.py
Dosyayı görüntüle @
516d8053
...
@@ -815,7 +815,7 @@ class TestMaildir(TestMailbox):
...
@@ -815,7 +815,7 @@ class TestMaildir(TestMailbox):
# skew factor to make _refresh think that the filesystem
# skew factor to make _refresh think that the filesystem
# safety period has passed and re-reading the _toc is only
# safety period has passed and re-reading the _toc is only
# required if mtimes differ.
# required if mtimes differ.
self
.
_box
.
_skewfactor
=
-
2
self
.
_box
.
_skewfactor
=
-
3
self
.
_box
.
_refresh
()
self
.
_box
.
_refresh
()
self
.
assertEqual
(
sorted
(
self
.
_box
.
_toc
.
keys
()),
sorted
([
key0
,
key1
]))
self
.
assertEqual
(
sorted
(
self
.
_box
.
_toc
.
keys
()),
sorted
([
key0
,
key1
]))
...
@@ -908,7 +908,12 @@ class TestMaildir(TestMailbox):
...
@@ -908,7 +908,12 @@ class TestMaildir(TestMailbox):
# refresh is done unconditionally if called for within
# refresh is done unconditionally if called for within
# two-second-plus-a-bit of the last one, just in case the mbox has
# two-second-plus-a-bit of the last one, just in case the mbox has
# changed; so now we have to wait for that interval to expire.
# changed; so now we have to wait for that interval to expire.
time
.
sleep
(
2.01
+
self
.
_box
.
_skewfactor
)
#
# Because this is a test, emulate sleeping. Instead of
# sleeping for 2 seconds, use the skew factor to make _refresh
# think that 2 seconds have passed and re-reading the _toc is
# only required if mtimes differ.
self
.
_box
.
_skewfactor
=
-
3
# Re-reading causes the ._toc attribute to be assigned a new dictionary
# Re-reading causes the ._toc attribute to be assigned a new dictionary
# object, so we'll check that the ._toc attribute isn't a different
# object, so we'll check that the ._toc attribute isn't a different
...
@@ -921,7 +926,8 @@ class TestMaildir(TestMailbox):
...
@@ -921,7 +926,8 @@ class TestMaildir(TestMailbox):
self
.
assertFalse
(
refreshed
())
self
.
assertFalse
(
refreshed
())
# Now, write something into cur and remove it. This changes
# Now, write something into cur and remove it. This changes
# the mtime and should cause a re-read.
# the mtime and should cause a re-read. Note that "sleep
# emulation" is still in effect, as skewfactor is -3.
filename
=
os
.
path
.
join
(
self
.
_path
,
'cur'
,
'stray-file'
)
filename
=
os
.
path
.
join
(
self
.
_path
,
'cur'
,
'stray-file'
)
support
.
create_empty_file
(
filename
)
support
.
create_empty_file
(
filename
)
os
.
unlink
(
filename
)
os
.
unlink
(
filename
)
...
...
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