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
17a1c4a7
Commit
17a1c4a7
authored
Mar 16, 2016
by
Jason Madden
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove some vestiges of 2.6 [skip ci]
parent
962e015f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
49 deletions
+0
-49
greentest/greentest.py
greentest/greentest.py
+0
-49
No files found.
greentest/greentest.py
View file @
17a1c4a7
...
...
@@ -439,55 +439,6 @@ class TestCase(TestCaseMetaClass("NewBase", (BaseTestCase,), {})):
self
.
assertLessEqual
(
delay
,
max_time
)
self
.
assertGreaterEqual
(
delay
,
min_time
)
if
not
hasattr
(
BaseTestCase
,
'assertGreater'
):
# Compatibility with 2.6, backported from 2.7
longMessage
=
False
def
_formatMessage
(
self
,
msg
,
standardMsg
):
"""Honour the longMessage attribute when generating failure messages.
If longMessage is False this means:
* Use only an explicit message if it is provided
* Otherwise use the standard message for the assert
If longMessage is True:
* Use the standard message
* If an explicit message is provided, plus ' : ' and the explicit message
"""
if
not
self
.
longMessage
:
return
msg
or
standardMsg
if
msg
is
None
:
return
standardMsg
try
:
# don't switch to '{}' formatting in Python 2.X
# it changes the way unicode input is handled
return
'%s : %s'
%
(
standardMsg
,
msg
)
except
UnicodeDecodeError
:
return
'%s : %s'
%
(
safe_repr
(
standardMsg
),
safe_repr
(
msg
))
def
assertLess
(
self
,
a
,
b
,
msg
=
None
):
"""Just like self.assertTrue(a < b), but with a nicer default message."""
if
not
a
<
b
:
standardMsg
=
'%s not less than %s'
%
(
safe_repr
(
a
),
safe_repr
(
b
))
self
.
fail
(
self
.
_formatMessage
(
msg
,
standardMsg
))
def
assertLessEqual
(
self
,
a
,
b
,
msg
=
None
):
"""Just like self.assertTrue(a <= b), but with a nicer default message."""
if
not
a
<=
b
:
standardMsg
=
'%s not less than or equal to %s'
%
(
safe_repr
(
a
),
safe_repr
(
b
))
self
.
fail
(
self
.
_formatMessage
(
msg
,
standardMsg
))
def
assertGreater
(
self
,
a
,
b
,
msg
=
None
):
"""Just like self.assertTrue(a > b), but with a nicer default message."""
if
not
a
>
b
:
standardMsg
=
'%s not greater than %s'
%
(
safe_repr
(
a
),
safe_repr
(
b
))
self
.
fail
(
self
.
_formatMessage
(
msg
,
standardMsg
))
def
assertGreaterEqual
(
self
,
a
,
b
,
msg
=
None
):
"""Just like self.assertTrue(a >= b), but with a nicer default message."""
if
not
a
>=
b
:
standardMsg
=
'%s not greater than or equal to %s'
%
(
safe_repr
(
a
),
safe_repr
(
b
))
self
.
fail
(
self
.
_formatMessage
(
msg
,
standardMsg
))
main
=
unittest
.
main
_original_Hub
=
gevent
.
hub
.
Hub
...
...
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