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