Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gevent
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
Kirill Smelkov
gevent
Commits
abe61a16
Commit
abe61a16
authored
Dec 01, 2013
by
Denis Bilenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pep8 fixes
parent
da8ac8c6
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
24 additions
and
14 deletions
+24
-14
examples/webchat/urls.py
examples/webchat/urls.py
+3
-3
greentest/test__pywsgi.py
greentest/test__pywsgi.py
+5
-1
greentest/util.py
greentest/util.py
+8
-4
util/cythonpp.py
util/cythonpp.py
+6
-4
util/wintest.py
util/wintest.py
+2
-2
No files found.
examples/webchat/urls.py
View file @
abe61a16
...
...
@@ -7,6 +7,6 @@ urlpatterns = patterns('webchat.chat.views',
(
'^a/message/updates$'
,
'message_updates'
))
urlpatterns
+=
patterns
(
'django.views.static'
,
(
r'^%s(?P<path>.*)$'
%
settings
.
MEDIA_URL
.
lstrip
(
'/'
),
'serve'
,
{
'document_root'
:
settings
.
MEDIA_ROOT
,
'show_indexes'
:
True
}))
(
r'^%s(?P<path>.*)$'
%
settings
.
MEDIA_URL
.
lstrip
(
'/'
),
'serve'
,
{
'document_root'
:
settings
.
MEDIA_ROOT
,
'show_indexes'
:
True
}))
greentest/test__pywsgi.py
View file @
abe61a16
...
...
@@ -611,7 +611,11 @@ class TestInternational(TestCase):
def
test
(
self
):
sock
=
self
.
connect
()
sock
.
sendall
(
'GET /%D0%BF%D1%80%D0%B8%D0%B2%D0%B5%D1%82?%D0%B2%D0%BE%D0%BF%D1%80%D0%BE%D1%81=%D0%BE%D1%82%D0%B2%D0%B5%D1%82 HTTP/1.1
\
r
\
n
Host: localhost
\
r
\
n
Connection: close
\
r
\
n
\
r
\
n
'
)
sock
.
sendall
(
'''GET /%D0%BF%D1%80%D0%B8%D0%B2%D0%B5%D1%82?%D0%B2%D0%BE%D0%BF%D1%80%D0%BE%D1%81=%D0%BE%D1%82%D0%B2%D0%B5%D1%82 HTTP/1.1
Host: localhost
Connection: close
'''
.
replace
(
'
\
n
'
,
'
\
r
\
n
'
))
read_http
(
sock
.
makefile
(),
reason
=
'PASSED'
,
chunks
=
False
,
body
=
''
,
content_length
=
0
)
...
...
greentest/util.py
View file @
abe61a16
...
...
@@ -287,13 +287,17 @@ def match_line(line, command):
def
matches
(
expected
,
command
):
"""
>>> matches(["* * C:
\
Py
t
hon27
\
py
t
hon.exe -u -m monkey_test --Event test_threading.py"], "C:
\
Py
t
hon27
\
py
t
hon.exe -u -m monkey_test --Event test_threading.py")
>>> matches(["* * C:
\
Py
t
hon27
\
py
t
hon.exe -u -m monkey_test --Event test_threading.py"],
... "C:
\
Py
t
hon27
\
py
t
hon.exe -u -m monkey_test --Event test_threading.py")
True
>>> matches(['* * /usr/bin/python2.5(-dbg)? -u -m monkey_test --Event test_urllib2net.py'], "/usr/bin/python2.5-dbg -u -m monkey_test --Event test_urllib2net.py")
>>> matches(['* * /usr/bin/python2.5(-dbg)? -u -m monkey_test --Event test_urllib2net.py'],
... "/usr/bin/python2.5-dbg -u -m monkey_test --Event test_urllib2net.py")
True
>>> matches(['* * /usr/bin/python2.5(-dbg)? -u -m monkey_test --Event test_urllib2net.py'], "/usr/bin/python2.5 -u -m monkey_test --Event test_urllib2net.py")
>>> matches(['* * /usr/bin/python2.5(-dbg)? -u -m monkey_test --Event test_urllib2net.py'],
... "/usr/bin/python2.5 -u -m monkey_test --Event test_urllib2net.py")
True
>>> matches(['* * /usr/bin/python2.5(-dbg)? -u -m monkey_test --Event test_urllib2net.py'], "/usr/bin/python2.6 -u -m monkey_test --Event test_urllib2net.py")
>>> matches(['* * /usr/bin/python2.5(-dbg)? -u -m monkey_test --Event test_urllib2net.py'],
... "/usr/bin/python2.6 -u -m monkey_test --Event test_urllib2net.py")
False
>>> matches(['* GEVENT_RESOLVER=ares GEVENTARES_SERVERS=8.8.8.8 python -u test__subprocess.py'],
... "GEVENT_RESOLVER=ares GEVENTARES_SERVERS=8.8.8.8 GEVENT_FILE=thread python -u test__subprocess.py")
...
...
util/cythonpp.py
View file @
abe61a16
...
...
@@ -388,7 +388,9 @@ def simplify_tags(tags):
>>> simplify_tags([set([('defined(world)', True), ('defined(hello)', True)]),
... set([('defined(world)', False), ('defined(hello)', True)])])
[set([('defined(hello)', True)])]
>>> simplify_tags([set([('defined(LIBEV_EMBED)', True), ('defined(_WIN32)', True)]), set([('defined(LIBEV_EMBED)', True), ('defined(_WIN32)', False)]), set([('defined(_WIN32)', False), ('defined(LIBEV_EMBED)', False)]), set([('defined(LIBEV_EMBED)', False), ('defined(_WIN32)', True)])])
>>> simplify_tags([set([('defined(LIBEV_EMBED)', True), ('defined(_WIN32)', True)]), set([('defined(LIBEV_EMBED)', True),
... ('defined(_WIN32)', False)]), set([('defined(_WIN32)', False), ('defined(LIBEV_EMBED)', False)]),
... set([('defined(LIBEV_EMBED)', False), ('defined(_WIN32)', True)])])
[]
"""
if
not
isinstance
(
tags
,
list
):
...
...
@@ -741,8 +743,8 @@ def combinations(iterable, r):
else
:
return
indices
[
i
]
+=
1
for
j
in
range
(
i
+
1
,
r
):
indices
[
j
]
=
indices
[
j
-
1
]
+
1
for
j
in
range
(
i
+
1
,
r
):
indices
[
j
]
=
indices
[
j
-
1
]
+
1
yield
tuple
(
pool
[
i
]
for
i
in
indices
)
...
...
@@ -752,7 +754,7 @@ def product(*args, **kwds):
pools
=
tuple
(
map
(
tuple
,
args
))
*
kwds
.
get
(
'repeat'
,
1
)
result
=
[[]]
for
pool
in
pools
:
result
=
[
x
+
[
y
]
for
x
in
result
for
y
in
pool
]
result
=
[
x
+
[
y
]
for
x
in
result
for
y
in
pool
]
for
prod
in
result
:
yield
tuple
(
prod
)
...
...
util/wintest.py
View file @
abe61a16
...
...
@@ -68,13 +68,13 @@ elif not args:
system('
scp
%
(
source
)
s
%
(
script_path
)
s
%
(
username
)
s
@%
(
host
)
s
:
' % options.__dict__)
if options.dist:
system('
ssh
%
(
username
)
s
@%
(
host
)
s
%
(
python
)
s
-
u
%
(
script_name
)
s
dist
%
(
source_name
)
s
'
% options.__dict__)
system('
ssh
%
(
username
)
s
@%
(
host
)
s
%
(
python
)
s
-
u
%
(
script_name
)
s
dist
%
(
source_name
)
s
' % options.__dict__)
try:
os.mkdir('
dist
')
except OSError:
pass
system('
scp
-
r
%
(
username
)
s
@%
(
host
)
s
:
%
(
dir_name
)
s
/
dist
/
dist
' % options.__dict__)
else:
system('
ssh
%
(
username
)
s
@%
(
host
)
s
C
:
/
Python27
/
python
.
exe
-
u
%
(
script_name
)
s
test
%
(
source_name
)
s
'
% options.__dict__)
system('
ssh
%
(
username
)
s
@%
(
host
)
s
C
:
/
Python27
/
python
.
exe
-
u
%
(
script_name
)
s
test
%
(
source_name
)
s
' % options.__dict__)
else:
sys.exit('
Invalid
args
:
%
r' % (args, ))
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