Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Kirill Smelkov
cpython
Commits
10d72552
Commit
10d72552
authored
23 years ago
by
Martin v. Löwis
Browse files
Options
Download
Email Patches
Plain Diff
Use raw-unicode-escape for the tests that require it.
parent
5d815f32
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
Lib/test/test_b1.py
Lib/test/test_b1.py
+2
-2
Lib/test/test_format.py
Lib/test/test_format.py
+1
-1
No files found.
Lib/test/test_b1.py
View file @
10d72552
...
...
@@ -256,7 +256,7 @@ if float(" 3.14 ") != 3.14: raise TestFailed, 'float(" 3.14 ")'
if
have_unicode
:
if
float
(
unicode
(
" 3.14 "
))
!=
3.14
:
raise
TestFailed
,
'float(u" 3.14 ")'
if
float
(
unicode
(
"
\u0663
.
\u0661\u0664
"
))
!=
3.14
:
if
float
(
unicode
(
"
\u0663
.
\u0661\u0664
"
,
'raw-unicode-escape'
))
!=
3.14
:
raise
TestFailed
,
'float(u"
\u0663
.
\u0661\u0664
")'
print
'getattr'
...
...
@@ -363,7 +363,7 @@ if have_unicode:
(
unicode
(
'100'
),
100
),
(
unicode
(
'314'
),
314
),
(
unicode
(
' 314'
),
314
),
(
unicode
(
'
\u0663\u0661\u0664
'
),
314
),
(
unicode
(
'
\u0663\u0661\u0664
'
,
'raw-unicode-escape
'
),
314
),
(
unicode
(
'
\t\t
314
\t\t
'
),
314
),
(
unicode
(
' 1x'
),
ValueError
),
(
unicode
(
' 1 '
),
1
),
...
...
This diff is collapsed.
Click to expand it.
Lib/test/test_format.py
View file @
10d72552
...
...
@@ -214,5 +214,5 @@ def test_exc(formatstr, args, exception, excmsg):
test_exc
(
'abc %a'
,
1
,
ValueError
,
"unsupported format character 'a' (0x61) at index 5"
)
if
have_unicode
:
test_exc
(
unicode
(
'abc %
\u3000
'
),
1
,
ValueError
,
test_exc
(
unicode
(
'abc %
\u3000
'
,
'raw-unicode-escape'
),
1
,
ValueError
,
"unsupported format character '?' (0x3000) at index 5"
)
This diff is collapsed.
Click to expand it.
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