Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cython
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
cython
Commits
a63120f5
Commit
a63120f5
authored
Feb 16, 2008
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
new tests for various unicode()/str() usage patterns
parent
b3547987
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
71 additions
and
0 deletions
+71
-0
tests/run/strfunction.pyx
tests/run/strfunction.pyx
+35
-0
tests/run/unicodefunction.pyx
tests/run/unicodefunction.pyx
+36
-0
No files found.
tests/run/strfunction.pyx
0 → 100644
View file @
a63120f5
__doc__
=
"""
>>> s('test')
'test'
>>> z
'test'
>>> c('testing')
'testing'
>>> sub('testing a subtype')
'testing a subtype'
>>> subs('testing a subtype')
'testing a subtype'
# >>> csub('testing a subtype')
# 'testing a subtype'
# >>> csubs('testing a subtype')
# 'testing a subtype'
"""
s
=
str
z
=
str
(
'test'
)
def
c
(
string
):
return
str
(
string
)
class
subs
(
str
):
pass
def
sub
(
string
):
return
subs
(
string
)
#cdef class subs(str):
# pass
#def csub(string):
# return csubs(string)
tests/run/unicodefunction.pyx
0 → 100644
View file @
a63120f5
__doc__
=
"""
>>> u('test')
u'test'
>>> z
u'test'
>>> c('testing')
u'testing'
>>> subu('testing a Python subtype')
u'testing a Python subtype'
>>> sub('testing a Python subtype')
u'testing a Python subtype'
# >>> csubu('testing a C subtype')
# u'testing a C subtype'
# >>> csub('testing a C subtype')
# u'testing a C subtype'
"""
u
=
unicode
z
=
unicode
(
'test'
)
def
c
(
string
):
return
unicode
(
string
)
class
subu
(
unicode
):
pass
def
sub
(
string
):
return
subu
(
string
)
#cdef class csubu(unicode):
# pass
#def csub(string):
# return csubu(string)
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