mirror of
https://github.com/jupyter/notebook.git
synced 2024-12-21 04:10:17 +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:',
|
||||
' y = memoryview(x)',
|
||||
' 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))',
|
||||
" return y, {'serialization': ('floatArray', 'TestWidget')}",
|
||||
' return y, {"serialization": ("floatArray", "TestWidget")}',
|
||||
'def _memoryview_to_array(x):',
|
||||
" return array('d', x.tobytes())",
|
||||
' return array("d", x.tobytes())',
|
||||
'arrays_binary = {',
|
||||
" 'from_json': _memoryview_to_array,",
|
||||
" 'to_json': _array_to_memoryview",
|
||||
' "from_json": _memoryview_to_array,',
|
||||
' "to_json": _array_to_memoryview',
|
||||
'}',
|
||||
'',
|
||||
'def _array_to_list(x):',
|
||||
' if x is None: return None, {}',
|
||||
" return list(x), {'serialization': ('floatList', 'TestWidget')}",
|
||||
' return list(x), {"serialization": ("floatList", "TestWidget")}',
|
||||
'def _list_to_array(x):',
|
||||
" return array('d',x)",
|
||||
' return array("d",x)',
|
||||
'arrays_list = {',
|
||||
" 'from_json': _list_to_array,",
|
||||
" 'to_json': _array_to_list",
|
||||
' "from_json": _list_to_array,',
|
||||
' "to_json": _array_to_list',
|
||||
'}',
|
||||
'',
|
||||
'class TestWidget(widgets.DOMWidget):',
|
||||
" _view_module = Unicode('TestWidget', sync=True)",
|
||||
" _view_name = Unicode('TestWidget', sync=True)",
|
||||
' _view_module = Unicode("TestWidget", sync=True)',
|
||||
' _view_name = Unicode("TestWidget", sync=True)',
|
||||
' array_binary = Instance(array, sync=True, **arrays_binary)',
|
||||
' array_list = Instance(array, sync=True, **arrays_list)',
|
||||
' msg = {}',
|
||||
|
Loading…
Reference in New Issue
Block a user