Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(3373)

Issue 105270044: Refactor tests, add base TestCase class

Can't Edit
Can't Publish+Mail
Start Review
Created:
9 years, 10 months ago by haypo_gmail
Modified:
9 years, 10 months ago
Reviewers:
yselivanov
Visibility:
Public.

Description

Refactor tests, add base TestCase class

Patch Set 1 #

Total comments: 10

Patch Set 2 : keyword only, assert, comment #

Unified diffs Side-by-side diffs Delta from patch set Stats (+143 lines, -212 lines) Patch
M asyncio/test_utils.py View 1 2 chunks +18 lines, -0 lines 0 comments Download
M tests/test_base_events.py View 2 chunks +4 lines, -7 lines 0 comments Download
M tests/test_events.py View 5 chunks +5 lines, -5 lines 0 comments Download
M tests/test_futures.py View 3 chunks +7 lines, -18 lines 0 comments Download
M tests/test_locks.py View 8 chunks +20 lines, -48 lines 0 comments Download
M tests/test_proactor_events.py View 3 chunks +5 lines, -3 lines 0 comments Download
M tests/test_queues.py View 7 chunks +10 lines, -22 lines 0 comments Download
M tests/test_selector_events.py View 5 chunks +14 lines, -9 lines 0 comments Download
M tests/test_streams.py View 2 chunks +3 lines, -2 lines 0 comments Download
M tests/test_subprocess.py View 3 chunks +6 lines, -4 lines 0 comments Download
M tests/test_tasks.py View 32 chunks +36 lines, -69 lines 0 comments Download
M tests/test_unix_events.py View 8 chunks +13 lines, -19 lines 0 comments Download
M tests/test_windows_events.py View 1 chunk +2 lines, -6 lines 0 comments Download

Messages

Total messages: 4
yselivanov
https://codereview.appspot.com/105270044/diff/1/asyncio/test_utils.py File asyncio/test_utils.py (right): https://codereview.appspot.com/105270044/diff/1/asyncio/test_utils.py#newcode386 asyncio/test_utils.py:386: def set_event_loop(self, loop, cleanup=True): Could you please make 'cleanup' ...
9 years, 10 months ago (2014-06-17 00:16:23 UTC) #1
yselivanov
+1 for change in general
9 years, 10 months ago (2014-06-17 00:16:51 UTC) #2
haypo_gmail
https://codereview.appspot.com/105270044/diff/1/asyncio/test_utils.py File asyncio/test_utils.py (right): https://codereview.appspot.com/105270044/diff/1/asyncio/test_utils.py#newcode386 asyncio/test_utils.py:386: def set_event_loop(self, loop, cleanup=True): On 2014/06/17 00:16:23, yselivanov wrote: ...
9 years, 10 months ago (2014-06-17 00:35:16 UTC) #3
yselivanov
9 years, 10 months ago (2014-06-17 00:39:58 UTC) #4
https://codereview.appspot.com/105270044/diff/1/asyncio/test_utils.py
File asyncio/test_utils.py (right):

https://codereview.appspot.com/105270044/diff/1/asyncio/test_utils.py#newcode388
asyncio/test_utils.py:388: if cleanup:
> It means that you should not pass None to set_event_loop(). Call directly
> asyncio.set_event_loop(None) if you want to pass None.

I this case I think we can have an assert statement with some explanation, like

assert loop, 'loop should never be None. Call asyncio.set_event_loop(None)
directly'

https://codereview.appspot.com/105270044/diff/1/asyncio/test_utils.py#newcode392
asyncio/test_utils.py:392: loop = TestLoop(gen)
OK ;)
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b