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
33a7fcc0
Kaydet (Commit)
33a7fcc0
authored
Eki 22, 2015
tarafından
Berker Peksag
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Issue #23981: Update test_unicodedata to use script_helpers
Patch by Christie.
üst
267597f0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
10 deletions
+5
-10
test_unicodedata.py
Lib/test/test_unicodedata.py
+5
-10
No files found.
Lib/test/test_unicodedata.py
Dosyayı görüntüle @
33a7fcc0
...
@@ -9,8 +9,7 @@
...
@@ -9,8 +9,7 @@
import
sys
import
sys
import
unittest
import
unittest
import
hashlib
import
hashlib
import
subprocess
from
test.support
import
script_helper
import
test.support
encoding
=
'utf-8'
encoding
=
'utf-8'
errors
=
'surrogatepass'
errors
=
'surrogatepass'
...
@@ -234,16 +233,12 @@ class UnicodeMiscTest(UnicodeDatabaseTest):
...
@@ -234,16 +233,12 @@ class UnicodeMiscTest(UnicodeDatabaseTest):
code
=
"import sys;"
\
code
=
"import sys;"
\
"sys.modules['unicodedata'] = None;"
\
"sys.modules['unicodedata'] = None;"
\
"""eval("'
\\\\
N{SOFT HYPHEN}'")"""
"""eval("'
\\\\
N{SOFT HYPHEN}'")"""
args
=
[
sys
.
executable
,
"-c"
,
code
]
# We use a separate process because the unicodedata module may already
# We use a subprocess because the unicodedata module may already have
# have been loaded in this process.
# been loaded in this process.
result
=
script_helper
.
assert_python_failure
(
"-c"
,
code
)
popen
=
subprocess
.
Popen
(
args
,
stderr
=
subprocess
.
PIPE
)
popen
.
wait
()
self
.
assertEqual
(
popen
.
returncode
,
1
)
error
=
"SyntaxError: (unicode error)
\\
N escapes not supported "
\
error
=
"SyntaxError: (unicode error)
\\
N escapes not supported "
\
"(can't load unicodedata module)"
"(can't load unicodedata module)"
self
.
assertIn
(
error
,
popen
.
stderr
.
read
()
.
decode
(
"ascii"
))
self
.
assertIn
(
error
,
result
.
err
.
decode
(
"ascii"
))
popen
.
stderr
.
close
()
def
test_decimal_numeric_consistent
(
self
):
def
test_decimal_numeric_consistent
(
self
):
# Test that decimal and numeric are consistent,
# Test that decimal and numeric are consistent,
...
...
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