| Conditions | 3 |
| Total Lines | 15 |
| Code Lines | 12 |
| Lines | 15 |
| Ratio | 100 % |
| Changes | 0 | ||
| 1 | import pytest |
||
| 14 | View Code Duplication | def test_vars(vim): |
|
|
|
|||
| 15 | vim.current.tabpage.vars['python'] = [1, 2, {'3': 1}] |
||
| 16 | assert vim.current.tabpage.vars['python'] == [1, 2, {'3': 1}] |
||
| 17 | assert vim.eval('t:python') == [1, 2, {'3': 1}] |
||
| 18 | assert vim.current.tabpage.vars.get('python') == [1, 2, {'3': 1}] |
||
| 19 | |||
| 20 | del vim.current.tabpage.vars['python'] |
||
| 21 | with pytest.raises(KeyError): |
||
| 22 | vim.current.tabpage.vars['python'] |
||
| 23 | assert vim.eval('exists("t:python")') == 0 |
||
| 24 | |||
| 25 | with pytest.raises(KeyError): |
||
| 26 | del vim.current.tabpage.vars['python'] |
||
| 27 | |||
| 28 | assert vim.current.tabpage.vars.get('python', 'default') == 'default' |
||
| 29 | |||
| 49 |