Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
5d910ea7
Commit
5d910ea7
authored
Nov 22, 2011
by
Victor Stinner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add a test on str.__getnewargs__()
It tests indirectly PyUnicode_Copy(): ensure that the string is a copy.
parent
bf1c6f7a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
0 deletions
+7
-0
Lib/test/test_unicode.py
Lib/test/test_unicode.py
+7
-0
No files found.
Lib/test/test_unicode.py
View file @
5d910ea7
...
...
@@ -1836,6 +1836,13 @@ class UnicodeTest(string_tests.CommonTest,
self
.
assertEqual
(
transform_decimal
(
'123
\
u20ac
'
),
'123
\
u20ac
'
)
def
test_getnewargs
(
self
):
text
=
'abc'
args
=
text
.
__getnewargs__
()
self
.
assertIsNot
(
args
[
0
],
text
)
self
.
assertEqual
(
args
[
0
],
text
)
self
.
assertEqual
(
len
(
args
),
1
)
class
StringModuleTest
(
unittest
.
TestCase
):
def
test_formatter_parser
(
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