mirror of
https://github.com/jupyter/notebook.git
synced 2025-01-12 11:45:38 +08:00
Make quoting consistent in the new tests
This commit is contained in:
parent
50a0cd57ef
commit
b7a0163810
@ -183,29 +183,29 @@ casper.notebook_test(function () {
|
|||||||
' try:',
|
' try:',
|
||||||
' y = memoryview(x)',
|
' y = memoryview(x)',
|
||||||
' except TypeError:',
|
' except TypeError:',
|
||||||
" # in python 2, arrays don't support the new buffer protocol",
|
' # in python 2, arrays do not support the new buffer protocol',
|
||||||
' y = memoryview(buffer(x))',
|
' y = memoryview(buffer(x))',
|
||||||
" return y, {'serialization': ('floatArray', 'TestWidget')}",
|
' return y, {"serialization": ("floatArray", "TestWidget")}',
|
||||||
'def _memoryview_to_array(x):',
|
'def _memoryview_to_array(x):',
|
||||||
" return array('d', x.tobytes())",
|
' return array("d", x.tobytes())',
|
||||||
'arrays_binary = {',
|
'arrays_binary = {',
|
||||||
" 'from_json': _memoryview_to_array,",
|
' "from_json": _memoryview_to_array,',
|
||||||
" 'to_json': _array_to_memoryview",
|
' "to_json": _array_to_memoryview',
|
||||||
'}',
|
'}',
|
||||||
'',
|
'',
|
||||||
'def _array_to_list(x):',
|
'def _array_to_list(x):',
|
||||||
' if x is None: return None, {}',
|
' if x is None: return None, {}',
|
||||||
" return list(x), {'serialization': ('floatList', 'TestWidget')}",
|
' return list(x), {"serialization": ("floatList", "TestWidget")}',
|
||||||
'def _list_to_array(x):',
|
'def _list_to_array(x):',
|
||||||
" return array('d',x)",
|
' return array("d",x)',
|
||||||
'arrays_list = {',
|
'arrays_list = {',
|
||||||
" 'from_json': _list_to_array,",
|
' "from_json": _list_to_array,',
|
||||||
" 'to_json': _array_to_list",
|
' "to_json": _array_to_list',
|
||||||
'}',
|
'}',
|
||||||
'',
|
'',
|
||||||
'class TestWidget(widgets.DOMWidget):',
|
'class TestWidget(widgets.DOMWidget):',
|
||||||
" _view_module = Unicode('TestWidget', sync=True)",
|
' _view_module = Unicode("TestWidget", sync=True)',
|
||||||
" _view_name = Unicode('TestWidget', sync=True)",
|
' _view_name = Unicode("TestWidget", sync=True)',
|
||||||
' array_binary = Instance(array, sync=True, **arrays_binary)',
|
' array_binary = Instance(array, sync=True, **arrays_binary)',
|
||||||
' array_list = Instance(array, sync=True, **arrays_list)',
|
' array_list = Instance(array, sync=True, **arrays_list)',
|
||||||
' msg = {}',
|
' msg = {}',
|
||||||
|
Loading…
Reference in New Issue
Block a user