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
941973a3
Kaydet (Commit)
941973a3
authored
Kas 30, 2007
tarafından
Christian Heimes
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fixed problem with regrtest caused by the additional of objects to _abcoll.
üst
d59c64c4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletion
+6
-1
regrtest.py
Lib/test/regrtest.py
+6
-1
No files found.
Lib/test/regrtest.py
Dosyayı görüntüle @
941973a3
...
...
@@ -689,6 +689,7 @@ def cleanup_test_droppings(testname, verbose):
def
dash_R
(
the_module
,
test
,
indirect_test
,
huntrleaks
):
# This code is hackish and inelegant, but it seems to do the job.
import
copy_reg
,
_abcoll
from
abc
import
_Abstract
if
not
hasattr
(
sys
,
'gettotalrefcount'
):
raise
Exception
(
"Tracking reference leaks requires a debug build "
...
...
@@ -699,7 +700,8 @@ def dash_R(the_module, test, indirect_test, huntrleaks):
ps
=
copy_reg
.
dispatch_table
.
copy
()
pic
=
sys
.
path_importer_cache
.
copy
()
abcs
=
{
obj
:
obj
.
_abc_registry
.
copy
()
for
abc
in
[
getattr
(
_abcoll
,
a
)
for
a
in
_abcoll
.
__all__
]
for
abc
in
[
getattr
(
_abcoll
,
a
)
for
a
in
_abcoll
.
__all__
if
isinstance
(
getattr
(
_abcoll
,
a
),
_Abstract
)]
for
obj
in
abc
.
__subclasses__
()
+
[
abc
]}
if
indirect_test
:
...
...
@@ -737,6 +739,7 @@ def dash_R_cleanup(fs, ps, pic, abcs):
import
_strptime
,
linecache
,
dircache
import
urlparse
,
urllib
,
urllib2
,
mimetypes
,
doctest
import
struct
,
filecmp
,
_abcoll
from
abc
import
_Abstract
from
distutils.dir_util
import
_path_created
# Restore some original values.
...
...
@@ -748,6 +751,8 @@ def dash_R_cleanup(fs, ps, pic, abcs):
# Clear ABC registries, restoring previously saved ABC registries.
for
abc
in
[
getattr
(
_abcoll
,
a
)
for
a
in
_abcoll
.
__all__
]:
if
not
isinstance
(
abc
,
_Abstract
):
continue
for
obj
in
abc
.
__subclasses__
()
+
[
abc
]:
obj
.
_abc_registry
=
abcs
.
get
(
obj
,
{})
.
copy
()
obj
.
_abc_cache
.
clear
()
...
...
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