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
76afd3b8
Kaydet (Commit)
76afd3b8
authored
Şub 14, 2009
tarafından
Benjamin Peterson
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
we're no longer using CVS, so this doesn't have to be binary
üst
09d3d2de
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
31 deletions
+30
-31
test_pep263.py
Lib/test/test_pep263.py
+30
-31
No files found.
Lib/test/test_pep263.py
Dosyayı görüntüle @
76afd3b8
#! -*- coding: koi8-r -*-
# This file is marked as binary in SVN, to prevent MacCVS from recoding it.
import
unittest
from
test
import
test_support
class
PEP263Test
(
unittest
.
TestCase
):
def
test_pep263
(
self
):
self
.
assertEqual
(
u""
.
encode
(
"utf-8"
),
'
\xd0\x9f\xd0\xb8\xd1\x82\xd0\xbe\xd0\xbd
'
)
self
.
assertEqual
(
u"
\"
.encode("
utf
-
8
"),
'
\\\xd0\x9f
'
)
def test_compilestring(self):
# see #1882
c = compile("
\
n
# coding: utf-8\nu = u'\xc3\xb3'\n", "dummy", "exec")
d
=
{}
exec
c
in
d
self
.
assertEqual
(
d
[
'u'
],
u'
\xf3
'
)
def
test_main
():
test_support
.
run_unittest
(
PEP263Test
)
if
__name__
==
"__main__"
:
test_main
()
#! -*- coding: koi8-r -*-
import
unittest
from
test
import
test_support
class
PEP263Test
(
unittest
.
TestCase
):
def
test_pep263
(
self
):
self
.
assertEqual
(
u""
.
encode
(
"utf-8"
),
'
\xd0\x9f\xd0\xb8\xd1\x82\xd0\xbe\xd0\xbd
'
)
self
.
assertEqual
(
u"
\"
.encode("
utf
-
8
"),
'
\\\xd0\x9f
'
)
def test_compilestring(self):
# see #1882
c = compile("
\
n
# coding: utf-8\nu = u'\xc3\xb3'\n", "dummy", "exec")
d
=
{}
exec
c
in
d
self
.
assertEqual
(
d
[
'u'
],
u'
\xf3
'
)
def
test_main
():
test_support
.
run_unittest
(
PEP263Test
)
if
__name__
==
"__main__"
:
test_main
()
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