# HG changeset patch # User Jason Grout # Date 1302042029 18000 # Node ID 18d1774c4f314685e59493301189c2876f65ce2e # Parent 33f1727409ea1a2cd12d692f3398f65306b81278 #10652: Reviewer patch that fixes the doctest and removes the title/system lines prepended to the worksheet since they didn't work. diff --git a/sagenb/notebook/notebook.py b/sagenb/notebook/notebook.py --- a/sagenb/notebook/notebook.py +++ b/sagenb/notebook/notebook.py @@ -1187,21 +1187,47 @@ sage: nb = sagenb.notebook.notebook.Notebook(tmp_dir()+'.sagenb') sage: name = tmp_filename() + '.html' sage: fd = open(name,'w') - sage: fd.write('\n'.join( - ... ['Test Notebook', - ... '', - ... '
',
-            ...            'sage: 1+1',
-            ...            '2',
-            ...          '
', - ... ''])) + sage: fd.write(''.join([ + ... '\n', + ... '\n', + ... '\n', + ... ' \n', + ... ' Test notebook — test\n', + ... ' \n', + ... ' \n', + ... '
\n', + ... '
\n', + ... '
\n', + ... '
\n', + ... '

Here are some computations:

\n', + ... '\n', + ... '
\n',
+            ... 'sage',
+            ... ': 1+1\n',
+            ... '2\n',
+            ... '
\n', + ... '\n', + ... '
\n', + ... ''])) sage: fd.close() sage: W = nb._import_worksheet_html(name, 'admin') sage: W.name() - u'Test Notebook' + u'Test notebook -- test' sage: W.owner() 'admin' sage: W.cell_list() + [TextCell 1:
+
+
+
+

Here are some computations:

+ +
, Cell 0; in=1+1, out= + 2 + , TextCell 2:
+ +