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
e8d6b398
Commit
e8d6b398
authored
Sep 15, 2010
by
Denis Bilenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
testrunner.py: pep8
parent
cca816e2
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
greentest/testrunner.py
greentest/testrunner.py
+5
-2
No files found.
greentest/testrunner.py
View file @
e8d6b398
...
@@ -190,9 +190,12 @@ def run_tests(options, args):
...
@@ -190,9 +190,12 @@ def run_tests(options, args):
module_name
=
arg
module_name
=
arg
if
module_name
.
endswith
(
'.py'
):
if
module_name
.
endswith
(
'.py'
):
module_name
=
module_name
[:
-
3
]
module_name
=
module_name
[:
-
3
]
class
_runner
(
object
):
class
_runner
(
object
):
def
__new__
(
cls
,
*
args
,
**
kawrgs
):
def
__new__
(
cls
,
*
args
,
**
kawrgs
):
return
DatabaseTestRunner
(
database_path
=
options
.
db
,
runid
=
options
.
runid
,
module_name
=
module_name
,
verbosity
=
options
.
verbosity
)
return
DatabaseTestRunner
(
database_path
=
options
.
db
,
runid
=
options
.
runid
,
module_name
=
module_name
,
verbosity
=
options
.
verbosity
)
if
options
.
db
:
if
options
.
db
:
import
unittest
import
unittest
unittest
.
TextTestRunner
=
_runner
unittest
.
TextTestRunner
=
_runner
...
@@ -419,7 +422,7 @@ def get_traceback_stats(output, test):
...
@@ -419,7 +422,7 @@ def get_traceback_stats(output, test):
traceback_count -= 1
traceback_count -= 1
items = counter.items()
items = counter.items()
items.sort(key=lambda (a, b): -b)
items.sort(key=lambda (a, b): -b)
if traceback_count
>
0:
if traceback_count
>
0:
items.append(('
other
traceback
', traceback_count))
items.append(('
other
traceback
', traceback_count))
result = []
result = []
for name, count in items:
for name, count in items:
...
@@ -431,7 +434,7 @@ def get_traceback_stats(output, test):
...
@@ -431,7 +434,7 @@ def get_traceback_stats(output, test):
def get_info(output, test):
def get_info(output, test):
output = output[:OUTPUT_LIMIT
*
2]
output = output[:OUTPUT_LIMIT
*
2]
traceback_stats, ignored_list = get_traceback_stats(output, test)
traceback_stats, ignored_list = get_traceback_stats(output, test)
warning_stats = get_warning_stats(output)
warning_stats = get_warning_stats(output)
result = traceback_stats + warning_stats
result = traceback_stats + warning_stats
...
...
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