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
a70805e1
Kaydet (Commit)
a70805e1
authored
Ock 12, 2014
tarafından
Ethan Furman
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Issue19995: fixed typo; switched from test.support.check_warnings to assertWarns
üst
61dab6e3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
17 deletions
+7
-17
test_unicode.py
Lib/test/test_unicode.py
+5
-15
unicodeobject.c
Objects/unicodeobject.c
+2
-2
No files found.
Lib/test/test_unicode.py
Dosyayı görüntüle @
a70805e1
...
@@ -1139,13 +1139,6 @@ class UnicodeTest(string_tests.CommonTest,
...
@@ -1139,13 +1139,6 @@ class UnicodeTest(string_tests.CommonTest,
self
.
value
=
float
(
value
)
self
.
value
=
float
(
value
)
def
__int__
(
self
):
def
__int__
(
self
):
return
int
(
self
.
value
)
return
int
(
self
.
value
)
def
check_depr
(
modifier
,
value
):
with
support
.
check_warnings
(
(
""
,
DeprecationWarning
),
quiet
=
False
,
):
warnings
.
simplefilter
(
'always'
)
modifier
%
value
pi
=
PsuedoFloat
(
3.1415
)
pi
=
PsuedoFloat
(
3.1415
)
letter_m
=
PsuedoInt
(
109
)
letter_m
=
PsuedoInt
(
109
)
self
.
assertEqual
(
'
%
x'
%
42
,
'2a'
)
self
.
assertEqual
(
'
%
x'
%
42
,
'2a'
)
...
@@ -1156,14 +1149,11 @@ class UnicodeTest(string_tests.CommonTest,
...
@@ -1156,14 +1149,11 @@ class UnicodeTest(string_tests.CommonTest,
self
.
assertEqual
(
'
%
X'
%
letter_m
,
'6D'
)
self
.
assertEqual
(
'
%
X'
%
letter_m
,
'6D'
)
self
.
assertEqual
(
'
%
o'
%
letter_m
,
'155'
)
self
.
assertEqual
(
'
%
o'
%
letter_m
,
'155'
)
self
.
assertEqual
(
'
%
c'
%
letter_m
,
'm'
)
self
.
assertEqual
(
'
%
c'
%
letter_m
,
'm'
)
for
mod
,
value
in
(
self
.
assertWarns
(
DeprecationWarning
,
'
%
x'
.
__mod__
,
pi
),
(
'
%
x'
,
pi
),
self
.
assertWarns
(
DeprecationWarning
,
'
%
x'
.
__mod__
,
3.14
),
(
'
%
x'
,
3.14
),
self
.
assertWarns
(
DeprecationWarning
,
'
%
X'
.
__mod__
,
2.11
),
(
'
%
X'
,
2.11
),
self
.
assertWarns
(
DeprecationWarning
,
'
%
o'
.
__mod__
,
1.79
),
(
'
%
o'
,
1.79
),
self
.
assertWarns
(
DeprecationWarning
,
'
%
c'
.
__mod__
,
pi
),
(
'
%
c'
,
pi
),
):
check_depr
(
mod
,
value
)
def
test_formatting_with_enum
(
self
):
def
test_formatting_with_enum
(
self
):
# issue18780
# issue18780
...
...
Objects/unicodeobject.c
Dosyayı görüntüle @
a70805e1
...
@@ -14005,7 +14005,7 @@ mainformatlong(PyObject *v,
...
@@ -14005,7 +14005,7 @@ mainformatlong(PyObject *v,
goto wrongtype;
goto wrongtype;
/* make sure number is a type of integer */
/* make sure number is a type of integer */
/* if not, issue depr
a
cation warning for now */
/* if not, issue depr
e
cation warning for now */
if (!PyLong_Check(v)) {
if (!PyLong_Check(v)) {
if (type == 'o' || type == 'x' || type == 'X') {
if (type == 'o' || type == 'x' || type == 'X') {
iobj = PyNumber_Index(v);
iobj = PyNumber_Index(v);
...
@@ -14103,7 +14103,7 @@ formatchar(PyObject *v)
...
@@ -14103,7 +14103,7 @@ formatchar(PyObject *v)
PyObject *iobj;
PyObject *iobj;
long x;
long x;
/* make sure number is a type of integer */
/* make sure number is a type of integer */
/* if not, issue depr
a
cation warning for now */
/* if not, issue depr
e
cation warning for now */
if (!PyLong_Check(v)) {
if (!PyLong_Check(v)) {
iobj = PyNumber_Index(v);
iobj = PyNumber_Index(v);
if (iobj == NULL) {
if (iobj == NULL) {
...
...
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