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
c7a2e465
Kaydet (Commit)
c7a2e465
authored
Nis 01, 2007
tarafından
Brett Cannon
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fix the test for recreating the locale cache object by not worrying about if
one of the test locales cannot be set.
üst
c6906650
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
4 deletions
+16
-4
test_strptime.py
Lib/test/test_strptime.py
+16
-4
No files found.
Lib/test/test_strptime.py
Dosyayı görüntüle @
c7a2e465
...
...
@@ -514,11 +514,23 @@ class CacheTests(unittest.TestCase):
return
try
:
_strptime
.
strptime
(
'10'
,
'
%
d'
)
# Get id of current cache object.
first_time_re_id
=
id
(
_strptime
.
_TimeRE_cache
)
locale
.
setlocale
(
locale
.
LC_TIME
,
(
'de_DE'
,
'UTF8'
))
_strptime
.
strptime
(
'10'
,
'
%
d'
)
second_time_re_id
=
id
(
_strptime
.
_TimeRE_cache
)
self
.
failIfEqual
(
first_time_re_id
,
second_time_re_id
)
try
:
# Change the locale and force a recreation of the cache.
locale
.
setlocale
(
locale
.
LC_TIME
,
(
'de_DE'
,
'UTF8'
))
_strptime
.
strptime
(
'10'
,
'
%
d'
)
# Get the new cache object's id.
second_time_re_id
=
id
(
_strptime
.
_TimeRE_cache
)
# They should not be equal.
self
.
failIfEqual
(
first_time_re_id
,
second_time_re_id
)
# Possible test locale is not supported while initial locale is.
# If this is the case just suppress the exception and fall-through
# to the reseting to the original locale.
except
locale
.
Error
:
pass
# Make sure we don't trample on the locale setting once we leave the
# test.
finally
:
locale
.
setlocale
(
locale
.
LC_TIME
,
locale_info
)
...
...
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