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
c206f0d1
Unverified
Kaydet (Commit)
c206f0d1
authored
Tem 24, 2018
tarafından
Serhiy Storchaka
Kaydeden (comit)
GitHub
Tem 24, 2018
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
bpo-34136: Make test_do_not_recreate_annotations more lenient. (GH-8437)
üst
d19d8d52
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
5 deletions
+4
-5
test_opcodes.py
Lib/test/test_opcodes.py
+4
-5
No files found.
Lib/test/test_opcodes.py
Dosyayı görüntüle @
c206f0d1
...
@@ -42,14 +42,13 @@ class OpcodeTest(unittest.TestCase):
...
@@ -42,14 +42,13 @@ class OpcodeTest(unittest.TestCase):
self
.
assertEqual
(
ns
[
'__annotations__'
],
{
'x'
:
int
,
1
:
2
})
self
.
assertEqual
(
ns
[
'__annotations__'
],
{
'x'
:
int
,
1
:
2
})
def
test_do_not_recreate_annotations
(
self
):
def
test_do_not_recreate_annotations
(
self
):
annotations
=
{}
# Don't rely on the existence of the '__annotations__' global.
# Don't rely on the existence of the '__annotations__' global.
with
support
.
swap_item
(
globals
(),
'__annotations__'
,
annotations
):
with
support
.
swap_item
(
globals
(),
'__annotations__'
,
{}):
del
globals
()[
'__annotations__'
]
class
C
:
class
C
:
del
__annotations__
del
__annotations__
x
:
int
# Updates the '__annotations__' global.
with
self
.
assertRaises
(
NameError
):
self
.
assertIn
(
'x'
,
annotations
)
x
:
int
self
.
assertIs
(
annotations
[
'x'
],
int
)
def
test_raise_class_exceptions
(
self
):
def
test_raise_class_exceptions
(
self
):
...
...
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