-
-
Notifications
You must be signed in to change notification settings - Fork 37.8k
Improve Python script #9417
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve Python script #9417
Changes from 6 commits
d3afc25
61f72f3
4bca6a3
77f4a0c
989f019
4cf1770
c18f3d6
2141cf6
dde736c
0068639
2ea7f8e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -180,3 +180,24 @@ def test_iterating(hass): | |
|
|
||
| assert hass.states.is_state('hello.1', 'world') | ||
| assert hass.states.is_state('hello.2', 'world') | ||
|
|
||
|
|
||
| @asyncio.coroutine | ||
| def test_unpacking_sequence(hass): | ||
| """Test compile error logs error.""" | ||
| source = """ | ||
| a,b = (1,2) | ||
| ab_list = [(a,b) for a,b in [(1,2), (3,4)]] | ||
| data['a'] = a | ||
| data['b'] = b | ||
| data['ab_list'] = ab_list | ||
| """ | ||
|
|
||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. blank line contains whitespace There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. blank line contains whitespace |
||
| data = {} | ||
| hass.async_add_job(execute, hass, 'test.py', source, data) | ||
| yield from hass.async_block_till_done() | ||
|
|
||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. blank line contains whitespace There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. blank line contains whitespace There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. blank line contains whitespace |
||
| assert data['a'] == 1 | ||
| assert data['b'] == 2 | ||
| assert data['ab_list'] == [(1,2),(3,4)] | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. missing whitespace after ',' |
||
|
|
||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. blank line at end of file |
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
expected 2 blank lines, found 1